News for hackers. Stuff that matters.
Re:Python built-ins worth learning (2019) by Buttons840 on Wednesday March 09, 2022 @10:45PM (#30623013)
Ah yes, that's another reason I do it, but I failed to mention. If you see "if not x:" then you're left wondering what x is (a boolean presumably), but "if len(x) == 0:" let's you know you're checking to see if a container is empty.

There are no comments on this comment yet.