import random # generates a random operation for the quiz to use def ops_generator(): # The list of operators there is to choose from operators = ["+", "-", "*", "/"] # Randomizes the operator for the quiz op = random.choice(operators) return op op = ops_generator() print(f"The chosen operator is: ({op})")