# Create the board data structure, with randomly placed icons. board =  for x in range(BOARDWIDTH): column =  for y in range(BOARDHEIGHT): column.append(icons) del icons # remove the icons as we assign them board.append(column) return board
Now we need to create a list of lists data structure for the board. We can do this with nested
for loops just like the
generateRevealedBoxesData() function did. For each column on the board, we will create a list of randomly selected icons. As we add icons to the column, on line 6  we will then delete them from the front of the
icons list on line 7 . This way, as the icons list gets shorter and shorter,
icons will have a different icon to add to the columns.
To picture this better, type the following code into the interactive shell. Notice how the
del statement changes the
>>> myList = ['cat', 'dog', 'mouse', 'lizard'] >>> del myList >>> myList ['dog', 'mouse', 'lizard'] >>> del myList >>> myList ['mouse', 'lizard'] >>> del myList >>> myList ['lizard'] >>> del myList >>> myList  >>>
Because we are deleting the item at the front of the list, the other items shift forward so that the next item in the list becomes the new "first" item. This is the same way line 7  works.