Oct-03-2021, 02:35 PM
Remember that 0 is treated as false when it is tested for its truth value (see the docs), so
x - 0
will evaluate to True
for any value that isn't 0. It's a strange way to write that predicate - it would be easier to read written as x != 0
, obviously.