input: Write a python function to check if a player has won in a tic-tac-toe game.
  assert check_win(["X", "X", "X", "_", "_", "_", "_", "_", "_"]) == "X"
  assert check_win(["O", "O", "O", "_", "_", "_", "_", "_", "_"]) == "O"
  assert check_win(["_", "_", "_", "X", "X", "X", "_", "_", "_"]) == "X"
  assert check_win(["_", "_", "_", "_", "_", "_", "O", "O", "O"]) == "O"
  assert check_win(["X", "_", "_", "X", "_", "_", "X", "_", "_"]) == "X"
  assert check_win(["_", "O", "_", "_", "O", "_", "_", "O", "_"]) == "O"
  assert check_win(["_", "_", "X", "_", "_", "X", "_", "_", "X"]) == "X"
  assert check_win(["X", "_", "_", "_", "X", "_", "_", "_", "X"]) == "X"
  assert check_win(["_", "_", "O", "_", "O", "_", "O", "_", "_"]) == "O"
  assert check_win(["_", "_", "_", "_", "_", "_", "_", "_", "_"]) == None
output: def check_win(board):
      # Check rows
      for i in range(0, 9, 3):
          if board[i] == board[i+1] == board[i+2] and board[i] != "_":
              return board[i]
      
      # Check columns
      for i in range(3):
          if board[i] == board[i+3] == board[i+6] and board[i] != "_":
              return board[i]
      
      # Check diagonals
      if board[0] == board[4] == board[8] and board[0] != "_":
          return board[0]
      if board[2] == board[4] == board[6] and board[2] != "_":
          return board[2]
      
      return None