代码示例:(标识:python_tuple_in)
python_tuple_in.py
thistuple = ("apple", "banana", "cherry")
if "apple" in thistuple:
  print("Yes, 'apple' is in the fruits tuple")
运行结果: