代码示例:(标识:python_oper_membership_1)
python_oper_membership_1.py
x = ["apple", "banana"]

print("banana" in x)

# returns True because a sequence with the value "banana" is in the list
运行结果: