Oct 13, 2017

Multiple chain comparison in Python

n = 10
result = 1 < n < 20
print(result)

# True

result = 1 > n <= 9
print(result)

# False
Post a Comment

Featured Post

Setup Chinese Input Method in Ubuntu 17.10 Artful

sudo apt install ibus-sunpinyin After either of those commands do not forget to restart the IBus daemon ibus restart You might need t...