Python支持布尔表达式中的短路吗?
python boolean-logic short-circuiting
考虑这段代码:
>>> 0 and True 0 >>> 0 and False 0
0当我在Python中运行上述命令时,为什么会出现这种情况?
0
python boolean-expression
python ×2
boolean-expression ×1
boolean-logic ×1
short-circuiting ×1