input: Write a python function to check if a player has won in a tic-tac-toe game.
  assert check_win([[1, 1, 1], [0, 0, 0], [0, 0, 0]]) == True
  assert check_win([[0, 0, 0], [2, 2, 2], [0, 0, 0]]) == True
  assert check_win([[0, 0, 0], [0, 0, 0], [3, 3, 3]]) == True
  assert check_win([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) == True
  assert check_win([[0, 0, 2], [0, 2, 0], [2, 0, 0]]) == True
  assert check_win([[0, 1, 0], [0, 1, 0], [0, 1, 0]]) == True
  assert check_win([[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == False
output: def check_win(board):
      # Check rows
      for row in board:
          if row[0] == row[1] == row[2] and row[0] != 0:
              return True
      
      # Check columns
      for col in range(3):
          if board[0][col] == board[1][col] == board[2][col] and board[0][col] != 0:
              return True
      
      # Check diagonals
      if board[0][0] == board[1][1] == board[2][2] and board[0][0] != 0:
          return True
      if board[0][2] == board[1][1] == board[2][0] and board[0][2] != 0:
          return True
      
      return False