Question: a = 0 def test ( ) : global a print ( a ) print ( b ) a = 5 b = 1 test

a=0
def test():
global a
print(a)
print(b)
a=5
b=1
test()
print(a)
print(b)
Hello, can you explain in detail what is the output and how exactly do you get that output? Step by step
 a=0 def test(): global a print(a) print(b) a=5 b=1 test() print(a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!