Dec-20-2020, 01:56 AM
i am doing testing for exactly the same as opposed to equivalent. this means using the is keyword for comparison. comparing 1 to True (for example) i want to be False. but i have cases in a new project where i need to test if a variable is (or is not) the same as any of a few values. the in keyword does not compare like is. it compares more like ==. is there a way to do an is-like comparison against a list (or tuple) of values? i tried this in the hope there was a way but that is not implemented.
if this is in that: print('yes') else: print('no')if this cannot be done, then that syntax is my suggested addition.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.