`UnboundLocalError` in this little code snipet is confusing me
951
Using global variables in a function
141719
NameError when using input()
82473
I'm getting an IndentationError. How do I fix it?
109430
What is the scope of the local variable/methods of an instance
2266
Why is my variable local in one 'while read' loop, but not in another seemingly similar loop?
139133
Why does this code crash at the places mentioned?
27136
Reference: What is variable scope, which variables are accessible from where and what are "undefined variable" errors?
12279
Accessing an array out of bounds gives no error, why?
49763
Problem with "scopes" of variables in try catch blocks in Java
142412
How to get/set local variables of a function (from outside) in Python?
113603
Declare local variables as late as possible or at the nearest curly brace they belong?
91295
Why does a Try/Catch block create new variable scope?
92587
Surprised that global variable has undefined value in JavaScript
46205
UnboundLocalError with nested function scopes
12683
How to access a local variable from a different function using pointers?
12738
Correct Use Of Global Variables In Python 3
45856
UnboundLocalError: local variable 'url_request' referenced before assignment