Multiple tuples for one for statement

Peter Hansen peter at engcorp.com
Mon Apr 25 12:48:49 EDT 2005


Ivan Van Laningham wrote:
> I can see that now.  I had three hours sleep last night and my brain
> hurts, so I don't get it.  I seek enlightenment.

So do I: did you mean you don't even "get" what
my code is doing, or you don't get what the OP
really wanted, or something else?

(My sample works only because I created tuples that
had exactly three items each, of course.  It's the
same as your previous code which didn't work, except
for the number of elements in each tuple.  I wrote
it just to show that R.C.James's idea was a reasonable,
if probably mistaken, interpretation of the OP's request.)

-Peter



More information about the Python-list mailing list