I am trying to make a list of lists in a one-lined efficient manner, but I can't come up with any way to avoid having references. This is what I have tried so far, obviously unsuccessfully:
>>> test=[[None]*3][:]*3
>>> test
[[None, None, None], [None, None, None], [None, None, None]]
>>> test[0][0]=0
>>> test
[[0, None, None], [0, None, None], [0, None, None]]
>>>
This is not what I want to happen. What I want is for 0 to be the first item of only the first list. How can I do this?