input: Write a python function to check if any player has won horizontally or vertically in a tic-tac-toe game.
  assert checkWin([['X', 'X', 'X'], [' ', 'O', 'O'], [' ', ' ', ' ']]) == 'X'
  assert checkWin([[' ', 'O', 'O'], ['X', 'X', 'X'], [' ', ' ', ' ']]) == 'X'
  assert checkWin([[' ', ' ', ' '], [' ', 'O', 'O'], ['X', 'X', 'X']]) == 'X'
  assert checkWin([['O', ' ', ' '], ['O', 'X', ' '], ['O', ' ', 'X']]) == 'O'
  assert checkWin([['X', 'O', ' '], ['O', 'O', 'O'], ['X', ' ', 'X']]) == 'O'
  assert checkWin([['X', ' ', ' '], ['X', ' ', ' '], ['X', ' ', ' ']]) == 'X'
output: def checkWin(board):
      # Check horizontal wins
      for row in board:
          if row[0] == row[1] == row[2] and row[0] != ' ':
              return row[0]
      
      # Check vertical wins
      for col in range(3):
          if board[0][col] == board[1][col] == board[2][col] and board[0][col] != ' ':
              return board[0][col]
      
      # No winner found
      return None