What's wrong with my code? I think it's right, but I'm not sure


#1

Here's my code:

Write your code below!

if guess_row = ship_row and guess_col = ship_col:
"Congratulations! You sank my battleship!"

The error:
File "python", line 29
if guess_row = ship_row and guess_col = ship_col:
..............^
SyntaxError: invalid syntax

And it says:
:warning: Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 29)


#2

In python the = is an assignment operator. You want the double == which means equals.


#3

Thanks, @zeziba!
It worked.