[Tutor] Bundle help!

David Perlman dperlman at wisc.edu
Mon Jul 9 17:53:41 CEST 2007


I think what you want to do is start from the beginning with two  
separate lists, sort each one however you want, and then either join  
them with zip() or simply reference them as (list1[n], list2[n]).

I believe there's also a way to use zip() to separate your list of  
tuples into separate lists, but I don't know how off the top of my  
head.  You can find out if you follow these instructions though:

Go to
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=comp.lang.py
enter 'zip inverse', and check search Python only.


On Jul 8, 2007, at 6:41 PM, Sara Johnson wrote:

> How would I do that so I wind up with both lists?  I have two lists  
> now, but if I try and reorder them they just reverse in  
> alphabetical order without affecting the second value (the number).
>

--
-dave----------------------------------------------------------------
All I ask is that the kind of unsolvable that it turns out to be has
respectable precedents.  -Jerry Fodor




More information about the Tutor mailing list