How do I set the list element at guess_row, guess_col to “X” in the Battleship game (step 11)?
Remember how to call an element from a 1-dimensional list? (i.e. list)
So in a 2-dimensional list, you add more info to it --> list
To put it in the context, I had
board[guess_row][guess_col] and set it equal to string X.
To add to the above, once we declare which index is for the row, and which is for the column, we cannot switch that around.
The row index is always first, and column index always second.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.