Gives this error message if I didn't enter the correct coordinates.
Traceback (most recent call last):
File "python", line 34, in
File "python", line 10, in print_board
TypeError: sequence item 1: expected string, list found
It shouldn't give any errors at all.
if guess_row == ship_row and guess_col == ship_col: print "Congratulations! You sank my battleship!" else: print "You missed my battleship!" board[guess_row][guess_col] = ["X"] print_board(board)