Python doesn't support multidimensional arrays, but I thought this workaround would be easy enough. It's just not working though. Here's my code
mat = [ [ None ] * 3 ] * 3
mat[0][0] = 1
return mat
Output
[[1, None, None], [1, None, None], [1, None, None]]
Why is it changing mat[1][0] and mat[2][0]? If I ask it to print mat[0][0] it just gives me 1 like it should.