标签:and 元组 style font tuple (()) 之间 注意 连接
s=tuple((5,3,6))
r=tuple(())
if r and s: #注意这里只能用and ,如果用&则报错
print("sfafda")
但是
if tuple():
pass
这个是可以的,如果空元组,是可以被判断出来的,,,,,
python 两个tuple元组之间连接判断是否有一个为空, and 和 & ,只能用and 不能用&
标签:and 元组 style font tuple (()) 之间 注意 连接
原文地址:https://www.cnblogs.com/DDBD/p/12230201.html