human
Here happens when we have identifiers with same name in differnet scopes given the following:
I am working on the file "Section 2 - Advance Python/Chapter S2.01 - Functional Programming/02_01_Functions_as_First_Class_citizens.ipynb".
The first task is:
Now, we have two instances of outer with different values of a thus returns they both return different values for same set of code (except where we updated the value of a).
Lets take another example, and see what happens when we have identifiers with same name in differnet scopes
Can you write Python code for it?
assistant
#Here happens when we have identifiers with same name in differnet scopes
.

x = 0

def outer():
    x = 1
    def inner():
        x = 2
        print("inner:", x)

    inner()
    print("outer:", x)

outer()
print("global:", x)