Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check an element in a list in python

thislist = ["apple", "banana", "cherry"]
if "apple" in thislist:
  print("Yes, 'apple' is in the fruits list")
Source by kite.com #
 
PREVIOUS NEXT
Tagged: #check #element #list #python
ADD COMMENT
Topic
Name
6+4 =