I am trying to define a list of lists with a loop in Python. I want to construct the following list:
x=[[0,0],[1,0],[2,0],...,[9,0]]
Here is basically what I do:
x=[[0,0]]*10
for i in range(10):
x[i][0]=i
print x
However, I end up with the following list:
x=[[9,0],[9,0],[9,0],...,[9,0]]
What am I doing wrong? Thank you so much for your help