a = [[0, 0, 0]] * 3
print(a)
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
a[1][0] = 99
print(a)
[[99, 0, 0], [99, 0, 0], [99, 0, 0]]
here when I am trying to update a[1][0]
every row automatically get updated how to overcome this
a = [[0, 0, 0]] * 3
print(a)
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
a[1][0] = 99
print(a)
[[99, 0, 0], [99, 0, 0], [99, 0, 0]]
here when I am trying to update a[1][0]
every row automatically get updated how to overcome this