逻辑运算符:
and
and 两端都是true,则返回的是true, 一端或两端包含false则返回false
or
or 其中一端包含true,则返回true, 两端包含false则返回false
not
not 取反
# and
print( 10 > 5 and 10 > 11)
# false
print( 10 > 11 and 10 > 5)
# false
print(10 > 10 and 10 > 11)
# false
print( 10 > 8 and 10 > 9)
# true
# or
print( 10 > 5 or 10 > 11)
# true
print( 10 > 11 or 10 > 5)
# true
print(10 > 10 or 10 > 11)
# false
print( 10 > 8 or 10 > 9)
# true
# not
print(not(True))
# false
print(not(False))
# true
print(not(10 > 5))
# false
print(not(10 < 5))
# true