September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,20 @@
animals = [
("fly", "I don't know why she swallowed a fly, perhaps she'll die."),
("spider", "It wiggled and jiggled and tickled inside her."),
("bird", "How absurd, to swallow a bird."),
("cat", "Imagine that, she swallowed a cat."),
("dog", "What a hog, to swallow a dog."),
("goat", "She just opened her throat and swallowed a goat."),
("cow", "I don't know how she swallowed a cow."),
("horse", "She's dead, of course.")]
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