input: Write a function to play Tic-Tac-Toe game between a human and a computer in Python, with the human always using 'X' and the computer always using 'O'. The function should initialize the game board, allow the human to make moves, and alternate turns until a win or a draw is achieved. If the human wins, print "You won!"; if the computer wins, the function should implicitly end the game without any specific message; if the game is drawn, print "The game is drawn!".
  
  beginBoard = ['-' for x in range(10)]
  assert playGame(beginBoard, 'X', 'O') == None
  
  beginBoardWinner = ['X','X','X', '-','O','-','-','O','-']
  assert playGame(beginBoardWinner, 'X', 'O') == None
  
  beginBoardDraw = ['X','O','X', 'X','O','O','O','X','X']
  assert playGame(beginBoardDraw, 'X', 'O') == None
output: def playGame(board, human, computer):
      def printBoard(board):
          print(board[1] + '|' + board[2] + '|' + board[3])
          print('-+-+-')
          print(board[4] + '|' + board[5] + '|' + board[6])
          print('-+-+-')
          print(board[7] + '|' + board[8] + '|' + board[9])
  
      def isWinner(board, player):
          return ((board[1] == player and board[2] == player and board[3] == player) or
                  (board[4] == player and board[5] == player and board[6] == player) or
                  (board[7] == player and board[8] == player and board[9] == player) or
                  (board[1] == player and board[4] == player and board[7] == player) or
                  (board[2] == player and board[5] == player and board[8] == player) or
                  (board[3] == player and board[6] == player and board[9] == player) or
                  (board[1] == player and board[5] == player and board[9] == player) or
                  (board[3] == player and board[5] == player and board[7] == player))
  
      def isBoardFull(board):
          for i in range(1, 10):
              if board[i] == '-':
                  return False
          return True
  
      def getHumanMove(board):
          move = ' '
          while move not in '1 2 3 4 5 6 7 8 9'.split() or not board[int(move)] == '-':
              print('What is your next move? (1-9)')
              move = input()
          return int(move)
  
      def getComputerMove(board):
          for i in range(1, 10):
              if board[i] == '-' and isWinner(board[:i] + [computer] + board[i+1:], computer):
                  return i
          for i in range(1, 10):
              if board[i] == '-' and isWinner(board[:i] + [human] + board[i+1:], human):
                  return i
          for i in [1, 3, 7, 9, 5, 2, 4, 6, 8]:
              if board[i] == '-':
                  return i
  
      while True:
          printBoard(board)
          if isWinner(board, human):
              print("You won!")
              break
          elif isWinner(board, computer):
              break
          elif isBoardFull(board):
              print("The game is drawn!")
              break
  
          move = getHumanMove(board)
          board[move] = human
          if isWinner(board, human) or isBoardFull(board):
              continue
  
          move = getComputerMove(board)
          board[move] = computer