Articles → Python → Check If The Value Exists In The List Using In Operator In Python
Check If The Value Exists In The List Using In Operator In Python
Example
list = [1,2,3]
print(11 in list)
list = [1,2,3]
print(2 in list)
Not In Operator
list = [1,2,3]
print(2 not in list)
Output
Posted By - | Karan Gupta |
|
Posted On - | Thursday, March 14, 2019 |
|
Updated On - | Thursday, May 2, 2019 |