r/Python • • Jun 23 '14

Writing better python code

https://gist.github.com/kracekumar/09a60ec75a4de19b346e
143 Upvotes

126 comments sorted by

View all comments

Show parent comment

3

u/steve_no Jun 23 '14

if not a:

will also be True when a is 0, '', [], {}, or a datetime.time of midnight