and 演算子の省略

範囲が簡単に指定できる。

a = 3
if 0 < a and a < 5:
    print("normal")

if 0 < a < 5:
    print("special")

f:id:ti-nspire:20180104130215p:plain