Tic Tac Toe in Python practice 2
Instead of using indices from 0 to 9, change the way you store your board to be a 3x3 list.
board = list([[0] * 3] * 3)
&quot;&quot;&quot;
1 | 2 | 3
4 | 5 | 6
7 | 8 | 9
&quot;&quot;&quot;

This will allow you to come back to it and add a GUI.
It also becomes easier for anyone reading the code to understand what's happening visually.
Next is your printout of the board. Join will be your friend here.
for row in board:
  printout = &quot;\t|\t&quot;.join(str(element) for element in row)
  print(printout) # this can be reduced to a single line if you want.

ranges
range() accepts 3 variables. START, STOP and INCREMENT AMOUNT
for i in range(0, 9, 3):


You can also reverse with negative values
for i in range(9, 0, -1):

or
for row in board[::-1]:

if statements
In math class you know how you were able to write a &lt; x &gt; b? You can do that in python without requiring and.
if 0 &lt;= number &gt; 10:

Then there is checking the board state if someone has won.
Your current approach requires a lot of coding and can't be expanded on quickly
There are a few different approaches you can do with this. All will &quot;work.&quot;
First the rows
for row in board:
  if len(set(row)) == 1:
    return True

for row in board:
  if all(element == row[0] for element in rows):
    return True

Diagonals next (I would use a tempory dummy variable for len(board) to increase readability. -&gt; _ = len(board)
if len(set(board[i][i] for i in range(len(board)) == 1:
  return True
if len(set(board[i][len(board)-i-1] for i in range(len(board)) == 1:
  return True

The columns can be a trickier but transposing would probably be the most pythonic way to approach it.
board_T = [list(column) for column in zip(board)]

This will allow you to call the rows again and check to see if someone won.
It should be noted that the return values for the winner state could return the PLAYER of rather than True or False. Python sees 0, None, Empty iterables, and False as False in an if statement.
I also noticed you didn't follow a lot of the advice given to you in the original post. You are still lacking an if __name__ == &quot;__main__&quot;: statement
def playTicTacToe():
   display_board(test_board)
   ...

...
if __name__ == &quot;__main__&quot;:
  playTicTacToe()