I have initialize this list in python
distance_between_customers = [[None] * len(vehicle)] * len(vehicle)
print(distance_between_customers)
The result is exactly what I need: [[None, None, None], [None, None, None], [None, None, None]] .
Now, I like to change 'only' the pivot to zeros
for i in range(len(vehicle)):
distance_between_customers[i][i] = 0
print(distance_between_customers)
The result I get is: [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
But I like to get this result: [[0, None, None], [None, 0, None], [None, None, 0]]
I need a help please. Thank you in advance.