Assignment vs. Mutation in Python
Briefly

Variables in Python are pointers, two variables can point to the same object. Changing that object reflects in both pointers.
Lists, dictionaries, and sets are mutable objects in Python, while tuples, numbers, and strings are immutable. Mutation alters mutable objects, assignment does not affect other variables pointing to the original object.
Read at Pythonmorsels
[
add
]
[
|
|
]