Twelve Days of Christmas by ch3ka

s1="On the %s day of Christmas,\nmy true love sent to me\n"\x0d
s="""Twelve drummers drumming,\x0d
Eleven pipers piping,\x0d
Ten lords a-leaping,\x0d
Nine ladies dancing,\x0d
Eight maids a-milking,\x0d
Seven swans a-swimming,\x0d
Six geese a-laying,\x0d
Five golden rings,\x0d
Four calling birds,\x0d
Three French hens,\x0d
Two turtle doves,\x0d
A%s partridge in a pear tree%s\n\n""".splitlines()\x0d
for i in range(12):print s1%(('first','second','third','four','fif','six','seven','eigh','nin','ten','eleven','twelf')[i]+("","th")[i>2]),"\n".join(s[11-i:])%(("nd a","")[not i],(".","!")[i==11])\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return top