Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Buttons840
on March 10, 2022
|
parent
|
context
|
favorite
| on:
Python built-ins worth learning (2019)
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: