![]() | Ned Batchelder : Blog | Code | Text | Site Python limericks » Home : Blog : March 2005 |
Python limericksThursday 24 March 2005 A thread on comp.lang.python asking about text-to-speech libraries turned into a call for Python limericks. The discussion meandered on for a while (let's just say there's a reason most of these people are engineers rather than poets), until Michael Spencer posted this piece of brilliance:
Not only is the Python code itself in the form of a limerick, but if you run it, it prints this: DA-DA-DUM DA-DA-DUM DA-DA-DUM Genius!
tagged:
geeky,
python
/
via:
Small values of cool» 3 reactions | |
Comments
You have just gone off the geek scale into dorkage lands none have ever seen. I would salute you if I didn't want to give you a wedgie so bad.
Hey, I categorized it under "geeky"! (of course, some would say that having a category called "geeky" just cements one's reputation as a geek...)
py2.3-compatible version: replace generator display with list comp.
from itertools import repeat
for feet in [3,3,2,2,3]:
print " ".join(["DA-DA-DUM"
for dummy in [None]
for foot in repeat("metric", feet)])
Add a comment: