Why does the expression 0 < 0 == 0 return False in Python?
I believe Python has special case handling for sequences of relational operators to make range comparisons easy to express. It’s much nicer to be able to say 0 < x <= 5 than to say (0 < x) and (x <= 5). These are called chained comparisons. And that’s a link to the documentation for … Read more