By: Ulearncoding
on April 04, 2020
/
Membership Operators
| Membership Operator | Description |
| in | अगर collection(list, tuple, dictionary, string, set) में element या value मिली तो True return करता है | |
| not in | अगर collection(list, tuple, dictionary, string, set) में element या value नहीं मिली तो True return करता है | |
'in' Membership Operator
Source Code :
a = "Hello World"
print("ll" in a)
list = [1, "o", 8, 5]
print(1 in list)
Output :
True
True
'not in' Membership Operator
Source Code :
a = "Hello World"
print("lol" not in a)
list = [1, "o", 8, 5]
print(3 not in list)
Output :
True
True
Tag:
Python
Program Life's Admin
We are.., This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
No comments: