I am having a Python program that creates lists of 3 elements.
['a', 'was', 'mother']
and adds them on an empty list,
output_text=[]
while True:
candidates = [t for t in lines if t[0:2] == last_two]
if not candidates:
break
triplet = random.choice(candidates)
last_two = triplet[1:3]
output_text.append(triplet)
print('
Επιλογ? Matching Τρι?δα?:
',triplet)
print('
Δ?ο Τελευτα?ε? Λ?ξει? Matching Τρι?δα?:
',last_two)
print(output_text)
I want to create an if statement that keeps adding the 3-element lists to output_text until 200 words (total elements) are being stored.
Any ideas?