I have the following code:
def test():
def printA():
def somethingElse():
pass
print(a)
aHA = a[2]
a = [1, 2, 3]
while True:
printA()
test()
I've noticed that this code will work fine, but if I change the aHA to just a, it says a is not defined.
Is there any way to set a to another value within printA?