input: Write a function to develop an AI Tic-Tac-Toe game using Python. The function should include methods to draw the board, check for a winning condition, and determine the computer's move. It should also have a method to start and play the game.
  
  def playGame():
      board = ['-' for x in range(10)] 
      won = False
      turn = -1
      while not won: 
          if turn == -1: 
              # human turn   
              humanSpot = int(input("Enter your spot: "))
              if board[humanSpot] == '-': 
                  board[humanSpot] = 'X' 
              else: 
                  print("the spot is already filled!") 
                  continue
              turn *= -1
         
          if checkWin(board,'X'): 
              drawBoard(board) 
              print("You won!") 
              won = True
              break
            
          if turn == 1: 
              # computer turn  
              computerSpot = getComputerSpot(board,'O') 
              if computerSpot == None: 
                  drawBoard(board) 
                  print("The game is drawn!")
                  break
              else: 
                  board[computerSpot] = 'O' 
              turn *= -1
                
          drawBoard(board) 
            
  playGame()
  
  assert checkWin(['X', 'X', 'X', '-', '-', '-', '-', '-', '-', '-'], 'X') == True
  assert checkWin(['O', 'O', 'O', '-', '-', '-', '-', '-', '-', '-'], 'O') == True
  assert checkWin(['X', '-', '-', '-', 'X', '-', '-', '-', 'X', '-'], 'X') == True
  assert checkWin(['-', '-', 'O', '-', 'O', '-', 'O', '-', '-', '-'], 'O') == True
  assert getComputerSpot(['-', 'X', 'O', 'X', '-', 'O', '-', '-', '-', '-'], 'O') != None
  assert getComputerSpot(['X', 'O', 'X', 'O', 'X', 'O', 'X', 'O', 'X', '-'], 'O') == None
output: def playGame():
      board = ['-' for x in range(10)] 
      won = False
      turn = -1
      while not won: 
          if turn == -1: 
              # human turn   
              humanSpot = int(input("Enter your spot: "))
              if board[humanSpot] == '-': 
                  board[humanSpot] = 'X' 
              else: 
                  print("the spot is already filled!") 
                  continue
              turn *= -1
         
          if checkWin(board,'X'): 
              drawBoard(board) 
              print("You won!") 
              won = True
              break
            
          if turn == 1: 
              # computer turn  
              computerSpot = getComputerSpot(board,'O') 
              if computerSpot == None: 
                  drawBoard(board) 
                  print("The game is drawn!")
                  break
              else: 
                  board[computerSpot] = 'O' 
              turn *= -1
                
          drawBoard(board) 
  
  def drawBoard(board):
      print(f"{board[1]} | {board[2]} | {board[3]}")
      print("---------")
      print(f"{board[4]} | {board[5]} | {board[6]}")
      print("---------")
      print(f"{board[7]} | {board[8]} | {board[9]}")
  
  def checkWin(board, player):
      win_conditions = [(1, 2, 3), (4, 5, 6), (7, 8, 9), (1, 4, 7), (2, 5, 8), (3, 6, 9), (1, 5, 9), (3, 5, 7)]
      for condition in win_conditions:
          if board[condition[0]] == board[condition[1]] == board[condition[2]] == player:
              return True
      return False
  
  def getComputerSpot(board, player):
      import random
      available_spots = [i for i in range(1, 10) if board[i] == '-']
      if not available_spots:
          return None
      return random.choice(available_spots)