input: Write a function to create an AI Tic-Tac-Toe game using Python. The function should include methods to print the board, check for a win condition, and determine the computer's move. The game should take player input and alternate turns between the player and the computer until there is a winner or a draw.
  
  assert playGame()
  assert playGame()
  assert playGame()
  assert playGame()
  assert playGame()
output: def playGame():
      board = [' ' for _ in range(9)]
      def print_board():
          print(f"{board[0]}|{board[1]}|{board[2]}")
          print("-+-+-")
          print(f"{board[3]}|{board[4]}|{board[5]}")
          print("-+-+-")
          print(f"{board[6]}|{board[7]}|{board[8]}")
  
      def check_win(player):
          win_conditions = [(0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)]
          for condition in win_conditions:
              if board[condition[0]] == board[condition[1]] == board[condition[2]] == player:
                  return True
          return False
  
      def computer_move():
          for i in range(9):
              if board[i] == ' ':
                  board[i] = 'O'
                  if check_win('O'):
                      return
                  board[i] = ' '
          for i in range(9):
              if board[i] == ' ':
                  board[i] = 'X'
                  if check_win('X'):
                      board[i] = 'O'
                      return
                  board[i] = ' '
          for i in range(9):
              if board[i] == ' ':
                  board[i] = 'O'
                  return
  
      while True:
          print_board()
          move = int(input("Enter your move (0-8): "))
          if board[move] == ' ':
              board[move] = 'X'
              if check_win('X'):
                  print_board()
                  return True
              if ' ' not in board:
                  print_board()
                  return True
              computer_move()
              if check_win('O'):
                  print_board()
                  return True
              if ' ' not in board:
                  print_board()
                  return True