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