Am 22.12.2011 00:20 schrieb Dennis Lee Bieber:
The key one is that lists ([] defines a list, not an array) are
"mutable". Your "7" is not mutable.
Strictly spoken, that's only a "side show" where the effect is visible.
The real key concept is that [] creates *one* object which is then
assigned to the three names. That's the same for mutable and immutable
objects.
But only the modification which happens on mutable objects turns it into
a problem.
The rest o your explanation is 100% correct.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list