比较运算

Comparisons
> >=
< <=
==
!=
is
is not
优先级 Priority
优先级相同,先来先算;比布尔运算高
更多信息,请访问 Python - comparisons
使用 Usage
一般操作
a = 5
if a > 0 and a < 9:
    print("a is greater than 0 and less than 9")      
链式操作 - 推荐
a = 5
if 9 > a > 0:
    print("a is greater than 0 and less than 9")
if 0 < a < 9:
    print("a is greater than 0 and less than 9")