input: Write a python function to check if a player has won in a TicTacToe game.
  assert TicTacToe().check_win() == False
  game = TicTacToe()
  game.board = [['x', 'x', 'x'], ['_', '_', '_'], ['_', '_', '_']]
  assert game.check_win() == True
  game.board = [['_', '_', '_'], ['o', 'o', 'o'], ['_', '_', '_']]
  assert game.check_win() == True
  game.board = [['_', '_', '_'], ['_', '_', '_'], ['x', 'x', 'x']]
  assert game.check_win() == True
  game.board = [['x', '_', '_'], ['x', '_', '_'], ['x', '_', '_']]
  assert game.check_win() == True
  game.board = [['_', 'o', '_'], ['_', 'o', '_'], ['_', 'o', '_']]
  assert game.check_win() == True
  game.board = [['_', '_', 'x'], ['_', '_', 'x'], ['_', '_', 'x']]
  assert game.check_win() == True
  game.board = [['x', '_', '_'], ['_', 'x', '_'], ['_', '_', 'x']]
  assert game.check_win() == True
  game.board = [['_', '_', 'o'], ['_', 'o', '_'], ['o', '_', '_']]
  assert game.check_win() == True
output: class TicTacToe:
      def __init__(self):
          self.board = [['_' for _ in range(3)] for _ in range(3)]
  
      def check_win(self):
          # Check rows
          for row in self.board:
              if row[0] == row[1] == row[2] and row[0] != '_':
                  return True
  
          # Check columns
          for col in range(3):
              if self.board[0][col] == self.board[1][col] == self.board[2][col] and self.board[0][col] != '_':
                  return True
  
          # Check diagonals
          if self.board[0][0] == self.board[1][1] == self.board[2][2] and self.board[0][0] != '_':
              return True
          if self.board[0][2] == self.board[1][1] == self.board[2][0] and self.board[0][2] != '_':
              return True
  
          return False