This happens because of how Python handles list multiplication. Here's a full example:
---
### Example:
```python
# Works as expected
matrixM = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
matrixM[1][1] = 2
print(matrixM)
# Output: [[0, 0, 0, 0], [0, 2, 0,]()]()
Use a list comprehension to create independent sublists:
matrixA = [[0]*4 for _ in range(4)]
matrixA[1][1] = 2
print(matrixA)
# Output: [[0, 0, 0, 0], [0, 2, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]