Python中表达式3<5>2的值为什么是Ture?
这是因为3<5>2是3<5 and 5>2的一种简写而已,结果当然是True。
下面是验证代码:
print(3<5>2)
print(3<5 and 5>2)
下面是运行截图: