Articles → Python → Check If The Value Exists In The List Using In Operator
Check If The Value Exists In The List Using In Operator
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)
Click to Enlarge