?
What will be the output of the following Python code?
What will be the output of the following Python code?
def f():
global a
print(a)
a = "hello"
print(a)
a = "world"
f()
print(a)
def f():
global a
print(a)
a = "hello"
print(a)
a = "world"
f()
print(a)
Join the Discussion
Login to post a comment or share your explanation.
Login