Raymond Hettinger: > Thought you guys might enjoy this: > http://code.activestate.com/recipes/576615/ Nice and short, but it's also very slow on my PC (Psyco may help). This solves them in moments: http://labix.org/python-constraint Bye, bearophile