I am having trouble making a 8*8 grid of coordinates in Python 2.7
For the sake of demonstrating, I tried to make a 3x3 grid like this:
grid=[]
for col in xrange(3):
grid.append([col])
for row in xrange(3):
grid[col].append([row])
print grid
I want to have:
grid = [[0,0],[0,1],[0,2],[1,0],[1,1],[1,2],[2,0],[2,1],[2,2]]
But what I got was:
grid = [[0, [0], [1], [2]], [1, [0], [1], [2]], [2, [0], [1], [2]]]
Any tips?