python的运算

Unlike C, all comparison operations in Python have the same priority,which is lower than that of any arithmetic, shifting or bitwiseoperation.……

Comparisons can be chained arbitrarily, e.g.,
"x < y <= z" isequivalent to "x < y and y <= z",​……

1<2==2

1<2 and 2==2

结果是True

posted @ 2017-08-21 19:26  hzxPeter  阅读(88)  评论(0)    收藏  举报