Old lady swallowed a fly: Difference between revisions

→‎{{header|Python}}: Update to Python 3
(→‎{{header|Python}}: Update to Python 3)
Line 3,045:
 
for i, (animal, lyric) in enumerate(animals):
print ("There was an old lady who swallowed a {}.\n{}".format(animal, lyric))
 
if animal == "horse": break
 
for (predator, _), (prey, _) in zip(animals[i:0:-1], animals[i-1::-1]):
print ("\tShe swallowed the {} to catch the {}".format(predator, prey))
 
if animal != "fly": print (animals[0][1]) # fly lyric
print() # new line</lang>
 
=={{header|Racket}}==