use the random module
>>> import random >>> lister = [1,2,3] >>> random.choice(lister) 3 >>> random.choice(lister) 1 >>> random.choice(lister) 3 >>> random.choice(lister) 3 >>> random.choice(lister) 2and one method is then you can make your question and correct answers as a dict such as
questions = { 'answer 1':'Question 1', 'answer 1':'Question 2', 'answer 1':'Question 3', }
Recommended Tutorials: