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