What will be printed?
x = 10 def f(): x = 20 print(x) f() print(x)
निम्न code का output क्या होगा?
A. 10 10
B. 20 20
C. 20 10
D. Error
The x inside f() is local (20), while the outside x remains 10.
Function के अंदर x local variable है जिसकी value 20 है, जबकि global x की value 10 ही रहती है।