The expression x or y
evaluates to x
if x
is true, or y
if x
is false.
Note that "true" and "false" in the above sentence are talking about "truthiness", not the fixed values True
and False
. Something that is "true" makes an if
statement succeed; something that's "false" makes it fail. "false" values include False
, None
, 0
and []
(an empty list).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…