input: Write a function to create an AI Tic-Tac-Toe game using Python. The function should include functionality to print the board, check for a win, determine the computer's move, and manage the game loop. The function should be named `play_tic_tac_toe`.
  assert play_tic_tac_toe()==None
  assert play_tic_tac_toe()==None
  assert play_tic_tac_toe()==None
  assert play_tic_tac_toe()==None
  assert play_tic_tac_toe()==None
output: def play_tic_tac_toe():
      def print_board(board):
          for row in board:
              print(" | ".join(row))
              print("-" * 5)
  
      def check_win(board, player):
          for row in board:
              if all([cell == player for cell in row]):
                  return True
          for col in range(3):
              if all([board[row][col] == player for row in range(3)]):
                  return True
          if all([board[i][i] == player for i in range(3)]) or all([board[i][2-i] == player for i in range(3)]):
              return True
          return False
  
      def is_full(board):
          return all([cell != " " for row in board for cell in row])
  
      def computer_move(board):
          for row in range(3):
              for col in range(3):
                  if board[row][col] == " ":
                      board[row][col] = "O"
                      return
  
      board = [[" " for _ in range(3)] for _ in range(3)]
      current_player = "X"
  
      while True:
          print_board(board)
          if current_player == "X":
              row, col = map(int, input("Enter row and column (0-2): ").split())
              if board[row][col] == " ":
                  board[row][col] = "X"
              else:
                  print("Cell already taken!")
                  continue
          else:
              computer_move(board)
  
          if check_win(board, current_player):
              print_board(board)
              print(f"{current_player} wins!")
              break
          if is_full(board):
              print_board(board)
              print("It's a tie!")
              break
  
          current_player = "O" if current_player == "X" else "X"