Q56
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)
A.
hello
hello
world
hello
world
B.
world
hello
hello
Answerhello
hello
C.
hello
world
world
world
world
D.
world
hello
world
hello
world
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board