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


Picture showing the output of non in operator in python



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, March 14, 2019
 
Updated On  -  Thursday, May 2, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250