x = [True, True, False]
if any(x):
print(“至少有一个True”)
if all(x):
print(“全是True”)
if any(x) and not all(x):
print(“至少一个True和一个False”)
欢迎分享,转载请注明来源:内存溢出
x = [True, True, False]
if any(x):
print(“至少有一个True”)
if all(x):
print(“全是True”)
if any(x) and not all(x):
print(“至少一个True和一个False”)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)