The title is not the issue. this issue i already solved by understanding the "immutable and mutable" -thing. But, I wanted to know a bit better about it. What are exactly allow the object to be acceced by another function if i dont tuch him and make shadow of the first one created. I show you with code:
def text():
print x
x = 6
text()
This example whill work well, because i didnt created a new object of immutable. but this:
def text():
print x
text()
x = 6
This will not work because the integer is not a global variable.
What is exactly happend when i created a new object without globaled it? to where in the memory this objects goes that allowed me to approach to it by another scope. why its so different then just a global?