11. Danger, Will Robinson! line error


#1



Hello! I'm having trouble with part 11 of my code. My code is below:

# Write your code below!
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', 'X' #this is where the error is occurring
    print print_board(board)

My error is:

Traceback (most recent call last):
File "python", line 33, in
TypeError: list indices must be integers, not tuple

I don't know what the error means. Thanks for any help in advance!


#2

Nevermind, I've figured it out!


#3
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 print_board(board)