What is the output of the following code ?
def foo(): global x x += 1 print(x) x = 12 print(x)
The function foo(), is never calledSo value of x will remain 12 at the outer scope as the following lines of code are only executed
foo()
x = 12 print(x)
Comment here: