Python Membership Operators:
We can use the PyCharm code editor for this example. If you do not know about it then follow this link- How to install PyCharm for Python and create a program in it. |
(1) Membership operators are used to check if a value is a member of the given sequence or not.
Operator | Description |
---|---|
in | Returns True if the variable/value is found in the specified sequence and False otherwise. |
not in | Returns True if the variable/value is not found in the specified sequence and False otherwise |
(2) Example of in operator.


(3) Example of not in operator.


Comments (No)