为什么(1 == 2!= 3)在Python中评估为False?

问题描述 投票:9回答:2

为什么(1 == 2 != 3)在Python中评价为False,而((1 == 2) != 3)(1 == (2 != 3))都评价为True

这里使用什么运算符优先级?

python operator-precedence
2个回答
© www.soinside.com 2019 - 2024. All rights reserved.