📜  逻辑运算符的操作数应该是布尔表达式,但是python不是很严格.任何非零数都被解释为真. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:06.007000             🧑  作者: Mango

代码示例1
x != y               # x is not equal to y
      x > y                # x is greater than y
      x < y                # x is less than y
      x >= y               # x is greater than or equal to y
      x <= y               # x is less than or equal to y
      x is y               # x is the same as y
      x is not y           # x is not the same as y