@worldsendless Any number but 0 is true. Any list / tuple / set / dictionary / string but the empty one is true.
@worldsendless 0 is false -- it's the only number that is.
I don't know that it's as much compatibility as letting programmers say "if x" rather than "if x != 0", "if data" rather than "if len(data) > 0", etc.
https://www.freecodecamp.org/news/truthy-and-falsy-values-in-python/
@worldsendless I can't cite any evidence, but it seems like there are many situations where you want to do something only if a value is not zero or empty. Certainly you often want to check if x == null before you try to access x's fields or methods.
@peterdrake as a happy Clojure dev I find myself wondering, why should developers want to write "if x != 0"? Why is it any better than "if x != 'cat'"? And why should language designers treat it specially?