Here is the code i am using:
if guess_col == ship_col and guess_row == ship_row:
print "Congratulations! You sank my battleship!"
print "You missed my battleship!"
board[guess_row][guess_col] == "X"
The code runs normally most of the time (aside from the board remaining the same), but sometimes the console prints out the error
Traceback (most recent call last):
File "python", line 33, in
IndexError: list index out of range
In board[guess_row][guess_col] == "X", i just needed to use one = .