Ah, so it's a mutable/immutable thing. Okay. That makes sense, because tuples seem to behave the same way, based on my limited testing.
Lets walk through this just to makes sure I understand:
The first variable x gets bound to five. This means 5 is used to generate a hash value (which is also 5, it seems based on testing), which python uses to decide what memory address to store the value '5' at.
Second variable x gets bound to five. Now, I though that with a pointer, a new hash value was generated for a new memory address, and that address just stored the location of the first memory address and told the computer to look there next.
But is the following happening instead for the second x?: python generates an identical hash for the second x, linking both x's back to the same memory address containing the 5 value.
See the distinction I'm trying to understand? With what I understand a pointer to be (and I may be totally wrong) is one address that just contains instructions which 'point' the program to another different address, but with what seems like it is happening in python, there is only one address that both variables refer to.
And you guys are saying that the process is different with mutables/immutables? Which, if either, of the scenarios I described previously happens with each of those?
I know theses seem like odd questions, but I think about things in an odd way, and this really does help me.