Bot V1
This commit is contained in:
11
quiz.py
11
quiz.py
@ -9,3 +9,14 @@ class Quiz(object):
|
||||
for line in file:
|
||||
question = tuple(string.strip() for string in tuple(line.split(" ")))
|
||||
self.questions.append(question)
|
||||
|
||||
|
||||
def __iter__(self):
|
||||
def questions_gen(questions):
|
||||
current = 0
|
||||
|
||||
while current < len(questions):
|
||||
yield questions[current]
|
||||
current += 1
|
||||
|
||||
return questions_gen(self.questions)
|
||||
|
Reference in New Issue
Block a user