I\'m using a list of lists to store a matrix in python. I tried to initialise a 2x3 Zero matrix as follows.
mat=[[0]*2]*3
However, when I chang
If the sizes involved are really only 2 and 3,
mat = [[0, 0], [0, 0], [0, 0]]
is easily best and hasn't been mentioned yet.