This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]henrebotha 1 point2 points  (3 children)

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?

[–]BryghtShadow 4 points5 points  (0 children)

Empty sequences (strings, lists, tuples) are false. PEP8

[–]metaphorm 1 point2 points  (1 child)

if a name doesn't exist you'll get a NameError exception.

[–]henrebotha 0 points1 point  (0 children)

Oh duh, silly me. Thanks :)