Practice Test Geeks home

PCEP Variable Scope and the `global` keyword 3

What is the output?
x = 'global'

def test():

global x

x = 'local'

test()

print(x)

Select your answer