On Apr 16, 10:12 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of Tim Chase > > Sent: Wednesday, April 16, 2008 9:53 AM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Re: vary number of loops > > > > If n=3, I want to have 3 sets of elements and mix them up using 3 > for > > > loops. > > > You might be ineterested in this thread: > > >http://mail.python.org/pipermail/python-list/2008-January/473650.html > > > where various solutions were proposed and their various merits > > evaluated. > > I second that. The thread compared building loops on the fly, building > comprehensions nested to arbitrarily levels, recursion (sloooow!), a > slick cookbook recipe using iterators, etc. and provided timings for > each method. Definitely worth bookmarking. >
Yes, I second that second :) Very nice thread, I'm leaning toward the "pythonic method" from there, but thanks for all the other solutions suggested here. Guess I need to go play with lambda more... nullgraph -- http://mail.python.org/mailman/listinfo/python-list