input: Write a function to implement a TicTacToe game in Python. The function should define a class TicTacToe with an initialization method to set up the game board and a method to display the current state of the board. It should also include a method to check if the current player has won the game. If the game has been won, the method should return True; otherwise, it should return False.
  assert TicTacToe().check_win()==False
  assert TicTacToe().display()=="""_ _ _
  _ _ _
  _ _ _"""
  assert TicTacToe().board==[['_', '_', '_'], ['_', '_', '_'], ['_', '_', '_']]
  assert TicTacToe().turn=='x'
output: class TicTacToe:
      def __init__(self):
          self.board = [['_', '_', '_'], ['_', '_', '_'], ['_', '_', '_']]
          self.turn = 'x'
  
      def display(self):
          return '\n'.join([' '.join(row) for row in self.board])
  
      def check_win(self):
          for row in self.board:
              if row[0] == row[1] == row[2] != '_':
                  return True
          for col in range(3):
              if self.board[0][col] == self.board[1][col] == self.board[2][col] != '_':
                  return True
          if self.board[0][0] == self.board[1][1] == self.board[2][2] != '_':
              return True
          if self.board[0][2] == self.board[1][1] == self.board[2][0] != '_':
              return True
          return False