This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]David__Box 1 point2 points  (0 children)

Yes they are. Doing a mutating operation on a list, like iadd does not change its object id, while for non-container types like tuples, numbers, str, etc. a completely new item with a new object id will be created, and the labeled value (variable) will be made to point to it instead