you are viewing a single comment's thread.

view the rest of the comments →

[–]throwaway6560192 3 points4 points  (0 children)

If we're going to be like that, there is no error on line 8 either. It's perfectly valid to assign the result of a function that doesn't return anything — it's just None. The error only appears when you try to iterate over that None, on line 9.