Variabel global python variabel lokal dengan nama yang sama

x = 5

def foo():
    x = 10
    print("local x:", x)


foo()
print("global x:", x)
SAMER SAEID