June 2017
Beginner
352 pages
8h 39m
English
When we assign from one variable to another, what we're really doing is assigning from one object reference to another object reference, so that both references then refer to the same object. For example, let's assign our existing variable x to a new variable y:
>>> y = x
That gives us this resulting reference-object diagram:

Now both references refer to the same object. We now reassign x to another new integer:
>>> x = 3000
Doing this gives us a reference-object diagram showing our two references and our two objects:
Read now
Unlock full access