3 ms·
I believe this is legal Python and does what you expect.
I believe this is legal Python and does what you expect.
in lisp its (< a b c)
The value of < is true if the numbers are in monotonically increasing order; otherwise it is false.
- clhs
Most of the time it does what you expect. Sometimes it has its own pitfalls unfortunately. a in b == True is one weird example...
This is tricky, but it is at least a PEP 8 violation to compare a Boolean expression to True or False with ==, and a linter will complain. Programming in Python without a linter can be perilous in general.