x = 10 def foo(): #print(x) #global x # error x = 20 print(x) foo()