Python For GCSE
Lists Of Lists
Python allows us to use lists as items in lists. In other languages, this can be done with a two dimensional array.
In order to access items in a list of lists, we use two sets of square brackets.
grid = [[0, 1, 2], [3, 4, 5], [6, 7, 8]] for y in range(3): for x in range(3): print(grid[y][x], end="") print()