Iteration for Factorials
Marco Mariani
marco at sferacarta.com
Tue Oct 30 06:53:49 EDT 2007
Nick Craig-Wood wrote:
> Note you can write your middle loop as
>
> for i in range(I):
> number = myNumer[:]
> random.shuffle(number)
> if number == myNumer:
> count+=1
Nice. Try 'em all, then count 'em.
Another wtfery would be a SQLAlchemy solution, generating dynamic
queries, using only OUTER JOINs and COUNT(). Could be a way to justify
hardware upgrades.
More information about the Python-list
mailing list