Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if item exists in list python

# plz suscribe to my youtube channel -->
# https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A

fruits = ["apple", "banana", "cherry","banana"]
item = "apple"
if item in fruits:
  print("Yes, '",item,"' is in the fruits list")
 
PREVIOUS NEXT
Tagged: #check #item #exists #list #python
ADD COMMENT
Topic
Name
6+4 =