How is this list of lists going to look like a board?


#1

Question

How is this list of lists going to look like a board?

Answer

In the next exercise we’re going to print the board row by row, rather than all at once, so that it’ll resemble a Battleship board! For now we’ve created the basic structure that stores our board’s cells and can be used for printing the board, firing at the ship, placing the ship, etc.
Soon, your board will look like this:

['O', 'O', 'O', 'O', 'O']
['O', 'O', 'O', 'O', 'O']
['O', 'O', 'O', 'O', 'O']
['O', 'O', 'O', 'O', 'O']
['O', 'O', 'O', 'O', 'O']

FAQ: Learn Python - Battleship - Check it Twice