input: Write a python function to check for a victory condition in a Tic Tac Toe game.
  assert is_victory("X", ["X", "X", "X", " ", " ", " ", " ", " ", " "]) == True
  assert is_victory("O", ["O", "O", "O", " ", " ", " ", " ", " ", " "]) == True
  assert is_victory("X", ["X", " ", " ", "X", " ", " ", "X", " ", " "]) == True
  assert is_victory("O", [" ", " ", "O", " ", "O", " ", "O", " ", " "]) == True
  assert is_victory("X", ["X", " ", " ", " ", "X", " ", " ", " ", "X"]) == True
  assert is_victory("O", [" ", " ", "O", " ", "O", " ", "O", " ", " "]) == True
  assert is_victory("X", [" ", " ", " ", " ", " ", " ", " ", " ", " "]) == False
output: def is_victory(player, board):
      # Define all possible victory lines in Tic Tac Toe
      victory_lines = [
          [0, 1, 2], [3, 4, 5], [6, 7, 8],  # Horizontal lines
          [0, 3, 6], [1, 4, 7], [2, 5, 8],  # Vertical lines
          [0, 4, 8], [2, 4, 6]              # Diagonal lines
      ]
      
      # Check if any victory line is completely filled by the given player
      for line in victory_lines:
          if all(board[i] == player for i in line):
              return True
      return False