标签: python comparison
>>> a = 2 >>> b = 3 >>> c = 2 >>> b > a == c True >>>
b > a == c等于a < b and c == a是真的吗,因为它是链式比较?
b > a == c
a < b and c == a
由于==的比较,这对我来说没有意义,我希望b > a == c等于(b > a) == c或b > (a == c)。
==
(b > a) == c
b > (a == c)
答案 0 :(得分:0)
python使用if(b> a)AND(a == c)自动更正您的比较