What is the output of the following code ?
x = 100 def scope_test(x): global x print('x == ', x) x = 2 print('X is changed to == ', x) scope_test(x) print('x is at outer scope', x)
We can not override the parameter x to global variableRefer to - https://docs.python.org/3/tutorial/classes.html#python-scopes-and-namespaces
Comment here: