input: Write a function to implement an AI-based Tic-Tac-Toe game in Python. The function should initialize the board, handle player and computer turns, check for a win condition, and display the board after each move. The function should return the final state of the board and print the result (either "You won!", "The game is drawn!", or "The game is lost!").
  
  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)
  
  assert playGame() is None
  assert drawBoard(['-', 'X', 'X', 'O', 'O', 'X', 'X', 'O', 'X', 'O']) == None
  assert checkWin(['-', 'X', 'X', 'O', 'O', 'X', 'X', 'O', 'X', 'O'], 'X') == True
  assert getComputerSpot(['-'] * 10, 'O') == a number between 1 and 9
output: def playGame():
      board = ['-' for x in range(10)] 
      won = False
      turn = -1
      while not won: 
          if turn == -1: 
              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: 
              computerSpot = getComputerSpot(board,'O') 
              if computerSpot == None: 
                  drawBoard(board) 
                  print("The game is drawn!")
                  break
              else: 
                  board[computerSpot] = 'O' 
              turn *= -1
                
          drawBoard(board)