标签:逻辑运算符 返回 优先 IV div pre 否则 false 逻辑运算
not and or
not > and >or
print(1 or 2) print(3 or 2) print(0 or 1) print(0 or 3)
#打印结果
1
3
1
3
printer(1 and 2) printer(0 and 2) printer(2 and 3)
#运行结果
2
0
3
printer(bool(1)) printer(bool(0)) printer(bool(2))
#运行结果
True
False
True
标签:逻辑运算符 返回 优先 IV div pre 否则 false 逻辑运算
原文地址:https://www.cnblogs.com/stationing/p/9162625.html