Thursday, 19 July 2012

Python Membership Operators:


Operator
Description
Example
In
Evaluates to true if it finds a variable in the specified sequence and false otherwise.
x in y, here in results in a 1 if x is a member of sequence y.
not in
Evaluates to true if it does not finds a variable in the specified sequence and false otherwise.
x not in y, here not in results in a 1 if x is a member of sequence y.

No comments:

Post a Comment