Find the output

Report a typo

What is the output of this code?

x, y = 1, 2

def foo():
    global y
    if y == 2:
        x = 2
        y = 1

foo()
print(x)
if y == 1:
    x = 3
print(x)
Select one option from the list
___

Create a free account to access the full topic