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?
CleverLibre Social is an inclusive social instance for open discussion, learning, and community. All cultures welcome. Hate speech and harassment strictly forbidden.