Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
 
PREVIOUS NEXT
Tagged: #python #check #list
ADD COMMENT
Topic
Name
7+8 =