import operator
a=10
b=20
print(operator.lt(a,b)) #lt 等价 <
print(operator.le(a,b)) #le 等价于<=
print(operator.ge(a,b)) # ge 等价 >=
print(operator.gt(a,b))# gt 等价 >
print(operator.eq(a,b))# eq 等价 ==
print(operator.ne(a,b))# ne 等价 !=
040 Python语法之operator模块
猜你喜欢
转载自blog.csdn.net/runnoob_1115/article/details/102952369
今日推荐
周排行