|
|
|
|
|
by pansa2
337 days ago
|
|
> Your first example has to do with the fact that tuples are copied by value, whereas lists are "copied" by reference. My mental model for Python is that everything is '"copied" by reference', but that some things are immutable and others are mutable. I believe that's equivalent to immutable objects being 'copied by value' and mutable ones being '"copied" by reference', but "everything is by reference" more accurately reflects the language's implementation. |
|