On Aug 9, 9:05 am, ToshiBoy <[EMAIL PROTECTED]> wrote: > I'm wondering how to do this the most elegant way: I found this quiz > in some magazine. I've already solved it on paper, but want to write a > python program to solve it. It comes down to being able to represent > range(1,27) through a number of formulas. How do I write a loop that > will loop through this list, so that: 1. every number only occurs > once, and 2. I get every possibility of order within the list? I guess > it'd be somewhat similar to Sudoku, where you have the numbers from > 1-9 in any possible order. Here it's 1-26.
Search for a permutation generator function. George -- http://mail.python.org/mailman/listinfo/python-list