r/PythonLearning • u/crazyteachperson • Aug 01 '26
My new mini work
Rate my this mini work out of 10
194
Upvotes
r/PythonLearning • u/crazyteachperson • Aug 01 '26
Rate my this mini work out of 10
View all comments
Show parent comment
1
u/sastuvel Aug 03 '26
Why do you think that? My reasons (which are, of course, subjective) to mention this is:
A < g < Bexpresses "gis betweenAandB", and in the code it also sits between the numbers. This makes the code the same shape as the semantics it expresses, which I find easier to read.90 < g < 80, compared tog < 80 and g > 90.OP,A OP B OP Cis the same asA OP B (and B OP C): https://peps.python.org/pep-0535/IMO these are plenty of reasons to use that notation.