a = 0
def f():
global a
a = 1
print(a)
print(a, f(), a)
The output of the above code turns out to be the following:
1
0 None 1
Why is the function f called before printing the first argument a? Why is the value of the first argument 0, even after the function call?