链式比较python有链式比较的机制,在一行里支持多种运算符比较。相当于拆分多个逻辑表达式,再进行逻辑与操作。a = 5 print(2 < a < 8) print(1 == a < 3)输出:True False