add-a-gram

Jason caljason76 at yahoo.com
Tue Feb 19 19:34:12 EST 2002


Here is a puzzle that was floating around comp.lang.lisp, and I was
wondering what a Python solution would be.  I am still learning Python
and am very curious how Python solutions differ from other languages,
like Perl or C.  Are there some set of maxims to the Python
programmer, and are there Python idioms for problem solutions?

Appended to the message is the problem, you can find the problems and
word list http://www.itasoftware.com/careers/programmers.php

----

Add-A-Gram 
An "add-a-gram" is a sequence of words formed by starting with a
3-letter word, adding a letter and rearranging to form a 4-letter
word, and so on. For example, here are add-a-grams of the words
"CREDENTIALS" and "ANACHRONISM":
 
ail + s = 
sail + n = 
nails + e = 
aliens + t = 
salient + r = 
entrails + c = 
clarinets + e = 
interlaces + d = 
CREDENTIALS (length 11) 

mar + c = 
cram + h = 
march + s = 
charms + o = 
chromas + n = 
monarchs + i = 
harmonics + a = 
maraschino + n = 
ANACHRONISM (length 11)



More information about the Python-list mailing list