Answers for "python check if element exists in tuple"

1

python check if element exists in tuple

thistuple = ("apple", "banana", "cherry")
if "apple" in thistuple:
  print("Yes, 'apple' is in the fruits tuple")
Posted by: Guest on May-17-2020

Code answers related to "python check if element exists in tuple"

Python Answers by Framework

Browse Popular Code Answers by Language