RT @veervrrrIn Python, True is 1, False is 0, and 2 is true.
(Thank @mayuutann for showing me that 2 is truthy)
@worldsendless Any number but 0 is true. Any list / tuple / set / dictionary / string but the empty one is true.
@peterdrake @worldsendless And for extra fun classes can have a __bool__ method.
@davep @peterdrake Interesting that in Clojure boolean only exist for interop purposes. Is it really a necessary type?
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.