需求


判断一个成员是不是元组中的成员

使用两种方法实现



示例


t = ("a","b","c")


temp = t.index("a")
print(temp)


temp2 = "k" in t
print(temp2)