Python Membership Operators
Membership operators are used to test if a sequence is presented in an object.
Types of Membership Operators
Name | Description | Example |
---|---|---|
in | Returns True if a sequence with the specified value is present in the object | a in b |
not in | Returns True if a sequence with the specified value is not present in the object | a not in b |