检查某个元组项目是否存在

  1. thistuple = ("apple", "banana", "cherry")
  2. if "apple" in thistuple:
  3. print("Yes, 'apple' is in the fruits tuple")