袁一鸣 袁一鸣 - 2 months ago 7
Python Question

File "python", line 35 elif:board[guess_row][guess_col]=="X": ^ SyntaxError: invalid syntax

enter image description here

i don't know why

File "python", line 35
elif:board[guess_row][guess_col]=="X":
^
SyntaxError: invalid syntax

Answer

No need of : after elif see the syntax here

elif board[guess_row][guess_col]=="X":