Alphametric fun with Python

Raymond Hettinger python at
Thu Jan 15 19:49:49 CET 2009

> > Thought you guys might enjoy this:
> >
> Nice and short, but it's also very slow on my PC (Psyco may help).
> This solves them in moments:

Intelligent search beats brute force permutation search.
The constraint solver is pretty nice.
The recipe is mainly about how to use itertools.permutations()
for simple programs that take minutes to write and get the job done.


More information about the Python-list mailing list