import random

def ask_questions(list_of_questions):
    while True:
        random.shuffle(list_of_questions)
for question in list_of_questions:
    print(question)
cont = input('Another question?')
if not cont:
    break
if not cont:
    break
Efficient algorithm for determining values not as frequent in a list