Showing posts with label operators. Show all posts
Showing posts with label operators. Show all posts

May 25, 2010

Tip of the Day #1 - in or not ?

I really love those small python's built in functions and operators. How to check if variable is in some collection ?

>>> z = x in s
>>> z
True
z will return True if x is in s. Isn't that cool or what ?
stat4u