【发布时间】:2018-12-05 22:53:41
【问题描述】:
什么有效:
a = ["0"]
b = ["1"]
c = ["2"]
d = ["3"]
if (not "0" in a) and (not "0" in b) and (not "0" in c) and (not "0" in
d):
print "you don't want this to be printing"
我尝试过但不起作用的方法:
if not "0" in (a and b and c and d):
print ""
if not "0" in a, b, c, d:
print ""
鉴于列表必须分开并且我有很多列表,我可以使用什么来避免我的第一个有效语句的不雅?
【问题讨论】:
标签: python arrays list boolean