Post

@PythonPr Answer: A (yes, the list `a` gets modified!)
Solution: Let's see what's happening under the hood.
a = [2,4,6,8,9]
creates a list with those values, and attaches the name `a` to it.
b = a
this looks up the list referenced by `a`, and gives it an additional name, `b`.
So now
+
English

@PythonPr there is a list with those values, and there are two names attached to it: a and b.
In other words, `a` and `b` are different names, but they refer to exactly the same object in memory.
It's like having two names for the same dog.
Now
b[4] = 10
Here
+
English

@PythonPr we are modifying the list referenced by `b`.
But recall that that's the same list referenced by `a`.
For this list, the value at index4 is changed to 10.
Thus, the underlying list (referenced by both a & b) is now
[2, 4, 6, 8, 10]
Notice that, in this process
+
English

@PythonPr we *never* made any change to `a` *explicitly*
HOWEVER, we modified the list through `b`,
and as `a` references the same list,
the value referenced by `a` got modified.
So,
print(a)
prints the current value referenced by `a`, ie
[2, 4, 6, 8, 10]
and that's the answer.
English

