You've got the list examples exactly right. That's how mutable copies work.
Regarding immutable types, like tuples, the first part is the same.
t1 = (1,2,3)
t2 = t1 #points to same location as pointed by t1
t3 = t2 #points to same location as pointed by t1
t4 = t3 #points to same location as pointed by t1
You are correct that an immutable type doesn't support append. As the word "immutable" suggests, the value cannot be mutated, or modified.
However, we can reassign.
t3 = (4,5,6) # t3 now points to (4,5,6). t1, t2, t4 still point to (1,2,3)
P.S. I'm rewriting this explanation in the book to be even clearer.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You've got the list examples exactly right. That's how mutable copies work.
Regarding immutable types, like tuples, the first part is the same.
You are correct that an immutable type doesn't support append. As the word "immutable" suggests, the value cannot be mutated, or modified.
However, we can reassign.
P.S. I'm rewriting this explanation in the book to be even clearer.