-1
I have a code that is very similar to the following
def um():
x = 'abc'
print(x)
def dois():
y = 'bcd'+ 'x'
print(y)
It turns out that, like x
is local in function um
, the function dois
can’t read the x
, returning an error that informs 'x has not been declared'.