On Sun, Aug 7, 2011 at 1:58 AM, Tim Roberts <t...@probo.com> wrote: > I did momentarily consider the following slimy solution: > L1 = dict(L).keys() > L2 = dict(L).values() > but that reorders the tuples. They still correspond, but in a different > order. >
Which can be overcome with collections.OrderedDict. But what's dict(L) going to do? It's going to loop over L, more than once in fact. I guess the real question is: Why do you wish to avoid a loop? ChrisA -- http://mail.python.org/mailman/listinfo/python-list