I just want to ask a simple question I created a list of list and want to change one value in the list by index it:
A = [[0] * 3] * 3
print A, A[0][0]
A[0][0] = 34343
print A
The result is:
[[0, 0, 0], [0, 0, 0], [0, 0, 0]] 0
[[34343, 0, 0], [34343, 0, 0], [34343, 0, 0]]
Why this happens?Where am I wrong?