我怎么能做这样的事情呢。
index=[[test1,test2,test3],[test4,test5,test6],[test7,test8,test9]]
if test5 is in index:
print True
Using any + 生成器表达式:
if any(test5 in subindex for subindex in index):
print True
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)