What is the output of the following code?
X = 'Test' def func(): global X X = 'test' func() print(X)
test
The global declaration forces the variable assigned inside the function to refer to the variable in the enclosing global scope.