Great job! Now that we’ve built our board, let’s show it off.

Throughout our game, we’ll want to print the game board so that the player can see which locations they have already guessed. Regularly printing the board will also help us debug our program.

The easiest way to print the board would be to have Python display it for us using the print command. Let’s give that a try and see what the results look like—is this a useful way to print our board for Battleship?



Use the print command to display the contents of the board list.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?