Hi, I started Python guided path course. In the variable scope section I face an issue.
In the notes we have a code snippet like this
x = "Global Variable" def foo(): print("Value of x: ", x) foo()
I run it and change the value of variable x here is the code snippet:
x = "Global Variable" def foo(): x = "somthig new happen" print("Value of x: ", x) foo() it work fine without throw any exception it means, we can update the global variable value. please correct me what I'm missing in understanding the concept. thanks