input: 
  def TicTacToe_Game():
      """Create a TicTacToe game in Python.
      This game should have an initialization function that initializes the board to a 3x3 grid filled with '_' to represent empty cells and the turn is set to 'x'.
      The game should also have a function to display the current board and a function to check if the current player has won.
      
      Example:
      >>> game = TicTacToe_Game()
      >>> game.display()
      _ _ _
      _ _ _
      _ _ _
      >>> game.board[0][0] = 'x'
      >>> game.board[1][1] = 'x'
      >>> game.board[2][2] = 'x'
      >>> game.check_win()
      True
      
      >>> game = TicTacToe_Game()
      >>> game.board[0][0] = 'o'
      >>> game.board[0][1] = 'o'
      >>> game.board[0][2] = 'o'
      >>> game.check_win()
      True
      """
      class TicTacToe:
          def __init__(self):
              self.board = [['_' for _ in range(3)] 
                          for _ in range(3)]
              self.turn = 'x'
              
          def display(self):
              for row in self.board:
                  print(' '.join(row))
  
          def check_win(self):
              board = self.board
  
              # check if the player with the current turn has a row of three
              for row in self.board:
                  if row.count(self.turn) == 3:
                      return True
                  
              # check if the player with the current turn has a column of three
              for col in range(3):
                  if board[0][col] == board[1][col] and board[1][col] == board[2][col] and board[2][col] == self.turn:
                      return True
                  
              # check for the two diagonals
              if board[0][0] == board[1][1] and board[1][1] == board[2][2] and board[2][2] == self.turn:
                  return True
              if board[0][2] == board[1][1] and board[1][1] == board[2][0] and board[2][0] == self.turn:
                  return True
              return False
      return TicTacToe
  
output:     def make_move(self, row, col):
          if self.board[row][col] == '_':
              self.board[row][col] = self.turn
              self.turn = 'o' if self.turn == 'x' else 'x'
          else:
              print("Invalid move, cell already taken.")
  
      def is_full(self):
          for row in self.board:
              if '_' in row:
                  return False
          return True
  
      def play(self):
          while not self.is_full():
              self.display()
              try:
                  row = int(input(f"Player {self.turn}, enter row (0-2): "))
                  col = int(input(f"Player {self.turn}, enter col (0-2): "))
                  if row not in range(3) or col not in range(3):
                      print("Invalid input, please enter numbers between 0 and 2.")
                      continue
                  self.make_move(row, col)
                  if self.check_win():
                      self.display()
                      print(f"Player {self.turn} wins!")
                      return
              except ValueError:
                  print("Invalid input, please enter numbers.")
          self.display()
          print("Game over, it's a draw!")