Question: In Python 3. You have defined your tic-tac-toe board to be a list of lists such as: [['X', 'O', 'X'], ['O', 'X', ''], ['', 'O',

In Python 3. You have defined your tic-tac-toe board to be a list of lists such as:

[['X', 'O', 'X'], ['O', 'X', ''], ['', 'O', 'X']]

Empty strings ('') denote a space that does not yet have a value.

Write a loop that will go through the board and change all 'X's to 'O's and all 'O's to 'X's. Leave the empty strings alone.

Your function MUST use loops.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!