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
Source by kite.com #
 
PREVIOUS NEXT
Tagged: #python #check #list
ADD COMMENT
Topic
Name
4+4 =