input: Write a function to implement a basic AI Tic-Tac-Toe game in Python. The game should alternate turns between the user ('X') and the AI ('O'), with the AI making random moves if it can't block the user or win immediately. The function should print the board after each move and announce the winner or if the game ends in a draw. The function header should be `def playGame()`. The test cases and their expected outputs follow:
  
  assert playGame() == None
  assert playGame() == None
output: def playGame():
      import random
  
      def print_board(board):
          for row in board:
              print(" | ".join(row))
              print("-" * 5)
  
      def check_winner(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 get_empty_cells(board):
          return [(i, j) for i in range(3) for j in range(3) if board[i][j] == ' ']
  
      def ai_move(board):
          for i in range(3):
              for j in range(3):
                  if board[i][j] == ' ':
                      board[i][j] = 'O'
                      if check_winner(board, 'O'):
                          return
                      board[i][j] = ' '
          for i in range(3):
              for j in range(3):
                  if board[i][j] == ' ':
                      board[i][j] = 'X'
                      if check_winner(board, 'X'):
                          board[i][j] = 'O'
                          return
                      board[i][j] = ' '
          empty_cells = get_empty_cells(board)
          if empty_cells:
              i, j = random.choice(empty_cells)
              board[i][j] = 'O'
  
      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'
                  if check_winner(board, 'X'):
                      print_board(board)
                      print("You win!")
                      return
                  current_player = 'O'
              else:
                  print("Cell already taken, try again.")
                  continue
          else:
              ai_move(board)
              if check_winner(board, 'O'):
                  print_board(board)
                  print("AI wins!")
                  return
              current_player = 'X'
  
          if is_full(board):
              print_board(board)
              print("It's a draw!")
              return