[Tutor] Bundle help!

Sara Johnson sarliz73 at yahoo.com
Mon Jul 9 19:32:34 CEST 2007


Sorry, just needing to clarify.  As I may have eluded to in other posts, this is sort of a script that was written and I'm making modifications to.  Due to my serious lack of experience, I'm afraid to rewrite anything.  However, would I accomplish the same result by copying the lists, then breaking them apart with zip()?  I haven't used that before, but I'm willing to try it as long as I don't ruin what's already been done.  
   
  Unfortunately, the link you posted didn't bring up anything.  I tried to search google groups and got a bunch of asian text (using comp.lang.py).
   
  Again, sorry for my lack of experience here.  I do speak C somewhat.
   
  Guess I should sign this:  
   
  HTDI...(hope that didn't irritate!)
   
  Sara

David Perlman <dperlman at wisc.edu> wrote:
  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


_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


       
---------------------------------
Pinpoint customers who are looking for what you sell. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070709/68fc1da1/attachment.htm 


More information about the Tutor mailing list