On 15/03/2016 00:26, jj0gen0i...@gmail.com wrote:
In Python is it possible to comparison-equate a variable to a List, Tupple, or Set and have it return True if the contents of the variable matches an element in the List, Tupple, or Set.
It's actually "tuple", but what the heck :)
E.g. x = "apple" x-list = ["apple", "banana", "peach"] If x == x-list: print('Comparison is True') else: print('Comparison is False')
if x in x-list: ... -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list