Membership Operators

Membership operators in Python.
(in) and (not in) Use to check the presence of element in the python sequence (eg. string, list, tuple, set and dictionary)

x = 'Hello world'
y = {1:'a',2:'b'}

# Output: True
print('H' in x)

# Output: True
print('hello' not in x)

# Output: True
print(1 in y)

# Output: False
print('a' in y)