input: 
  def play_tictactoe() -> None:
      """Simulate a TicTacToe game and print the board after each move.
      The game should alternate between 'x' and 'o' until there is a winner or a tie.
      >>> play_tictactoe()
      _ _ _
      _ _ _
      _ _ _
      o _ _
      _ _ _
      _ x _
      o _ _
      o _ _
      _ x _
      """
  
output:     board = [['_' for _ in range(3)] for _ in range(3)]
      players = ['x', 'o']
      current_player = 0
  
      def print_board():
          for row in board:
              print(' '.join(row))
          print()
  
      def check_winner():
          for row in board:
              if row[0] == row[1] == row[2] != '_':
                  return row[0]
          for col in range(3):
              if board[0][col] == board[1][col] == board[2][col] != '_':
                  return board[0][col]
          if board[0][0] == board[1][1] == board[2][2] != '_':
              return board[0][0]
          if board[0][2] == board[1][1] == board[2][0] != '_':
              return board[0][2]
          return None
  
      def is_full():
          return all(cell != '_' for row in board for cell in row)
  
      while True:
          print_board()
          row = int(input(f"Player {players[current_player]}, enter row (0, 1, 2): "))
          col = int(input(f"Player {players[current_player]}, enter column (0, 1, 2): "))
  
          if board[row][col] == '_':
              board[row][col] = players[current_player]
              winner = check_winner()
              if winner:
                  print_board()
                  print(f"Player {winner} wins!")
                  break
              if is_full():
                  print_board()
                  print("It's a tie!")
                  break
              current_player = 1 - current_player
          else:
              print("Cell already taken, try again.")