Write better Python code by using comparison operator chaining (a < b < c)
Published in
3 min readNov 28, 2022
If you’ve programmed before, then you’ve likely used a combination of comparisons in conditions. I’m talking things like:
if a == "hi" && b == "hi" { ...}
and
if a < 3 && b < 5 { ...