I've got a list of coordinate and i'm trying to change the value of these coordinate for something else in an NxN matrix as follows:
import numpy as np
point2 = [(1,3), (3,5), (6,7), (10,10)]
usine_ = ["" * i for i in range(10)]
usine = []
[usine.append(usine_) for i in range(10)]
for i in point2:
x = i[0]
y = i[1]
del usine[y-1][x-1]
usine[y-1].insert(x-1, "x")
usine = np.array(usine)
print(usine)
But my code seems to change the x value of the coordinate for every list in my list
[['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']
['x' '' 'x' '' '' 'x' '' '' '' 'x']]
I've been trying to figure out what I'm doing wrong but I can't put my finger on it.