Jussi Piitulainen wrote:
Would it help to say that in case 1 the relevant statement acts on the
variable while in case 2 it acts on the value of the variable?

I would try to avoid using words like "value" and "variable",
because they don't have well-defined meanings in Python.

The way I would put it is that

   a = b

changes which object the name 'a' refers to, whereas

   a[i] = b

does not.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to