Post

@PythonPr Answer: b ([10, 2, 3]).
The trap: y = x doesn't copy the list! Lists are like boxes with name tags. y = x puts both tags (x and y) on the same box.
y[0] = 10 changes the box, so both tags reflect the change.
For beginners: To create a separate box, use y = x.copy().
English

@PythonPr B. [10, 2, 3]
y is not a copy of x but rather reference to the list attached to x as well
English

@PythonPr interesting take, feels like we’re watching sci fi turn into reality in real time
English














