From 338e808cc82da583dc53626cda31cbbe9c7faafc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 5 Feb 2013 09:07:18 -0500 Subject: [PATCH] Make get_question() a bit more interesting --- quizzer/ui/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quizzer/ui/__init__.py b/quizzer/ui/__init__.py index afb0726..eb8682d 100644 --- a/quizzer/ui/__init__.py +++ b/quizzer/ui/__init__.py @@ -10,7 +10,8 @@ class UserInterface (object): raise NotImplementedError() def get_question(self): - return self.quiz[0] + remaining = [q for q in self.quiz if q not in self.answers] + return remaining[0] def process_answer(self, question, answer): if question not in self.answers: -- 2.26.2