Python mit globalen und lokalen Variablen im selben Code
x = "global "
def foo():
global x
y = "local"
x = x * 2
print(x)
print(y)
foo()
SAMER SAEID
x = "global "
def foo():
global x
y = "local"
x = x * 2
print(x)
print(y)
foo()