Variable Scope
Learn which names a function can see, why assigning inside a body makes a name local, what UnboundLocalError means, and when global is the wrong fix.
Learn which names a function can see, why assigning inside a body makes a name local, what UnboundLocalError means, and when global is the wrong fix.