MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/28utww/writing_better_python_code/cif4hus/?context=3
r/Python • u/kracekumar • Jun 23 '14
126 comments sorted by
View all comments
2
What's he doing under "Counting Condition"? Does if list return False for a zero-length list, or only if the named list doesn't exist?
if list
False
2 u/metaphorm Jun 23 '14 if a name doesn't exist you'll get a NameError exception. 1 u/[deleted] Jun 23 '14 Oh duh, silly me. Thanks :)
if a name doesn't exist you'll get a NameError exception.
1 u/[deleted] Jun 23 '14 Oh duh, silly me. Thanks :)
1
Oh duh, silly me. Thanks :)
2
u/[deleted] Jun 23 '14
What's he doing under "Counting Condition"? Does
if listreturnFalsefor a zero-length list, or only if the named list doesn't exist?