代码示例:(标识:python_list_in)
python_list_in.py
thislist = ["apple", "banana", "cherry"]
if "apple" in thislist:
  print("Yes, 'apple' is in the fruits list")
运行结果: