As I understand it, when creating a variable, we are creating an object, and the name of the variable refers to it.
If I do:
a = 2
a = "Hola"
The garbage collector takes care of deleting object 2, since it doesn't need it and no other variable is referencing it in the program. Instead if I write:
a = 2
b = a
a = "Hola"
Since b is referencing object 2, I now have both objects in memory, and neither is deleted.
I am right? Thank you very much.