I want to create a matrix of list, but when I create the lists inside the matrix it created a linked list, and I don't need that.
A=[[{}]*3]*3
result: [[{}, {}, {}], [{}, {}, {}], [{}, {}, {}]]
A[0][2]['h1']=1
result: [[{'h1': 1}, {'h1': 1}, {'h1': 1}],
[{'h1': 1}, {'h1': 1}, {'h1': 1}],
[{'h1': 1}, {'h1': 1}, {'h1': 1}]]
Anyone knows how to avoid this? I need a list inside each field of the matrix.