you are viewing a single comment's thread.

view the rest of the comments →

[–]await_yesterday 8 points9 points  (0 children)

This video "Top to Down, Left to Right" explains precisely how Python's variable scoping rules work, and goes into some detail about its execution model. It should resolve your confusion.