Scripting >> Python >> Examples >> Operators >> Identity and Membership operators

 

 

Operator Meaning Example
is True if the operands are identical (refer to the same object) x is True
is not True if the operands are not identical (do not refer to the same object)

x is not True

 

 

 

Operator Meaning Example
in True if value/variable is found in the sequence 5 in x
not in True if value/variable is not found in the sequence 5 not in x