Nested Lists
grid = [[0, 0, 0], [0, 1, 0], [0, 0, 0]]
print(grid)
print(grid[1]) # the second row
print(grid[1][1]) # the center element
[[0, 0, 0], [0, 1, 0], [0, 0, 0]]
[0, 1, 0]
1
grid = [[0, 0, 0], [0, 1, 0], [0, 0, 0]]
print(grid)
print(grid[1]) # the second row
print(grid[1][1]) # the center element
[[0, 0, 0], [0, 1, 0], [0, 0, 0]]
[0, 1, 0]
1