Answers for "python check if item is in list"

15

python check if list contains

# To check if a certain element is contained in a list use 'in'
bikes = ['trek', 'redline', 'giant']
'trek' in bikes
# Output:
# True
Posted by: Guest on February-19-2020

Code answers related to "python check if item is in list"

Python Answers by Framework

Browse Popular Code Answers by Language