Skip to content

Tag: in-place

In-place modification of Python lists

I am trying to perform in-place modification of a list of list on the level of the primary list. However, when I try to modify the iterating variable (row in the example below), it appears to create a new pointer to it rather than modifying it. Smallest example of my problem. The above example is a trivial ex…