[Tutor] Sorting more than one list

Brian van den Broek bvande at po-box.mcgill.ca
Thu Mar 31 01:42:05 CEST 2005


Brian van den Broek said unto the world upon 2005-03-30 18:28:
> Diego Galho Prestes said unto the world upon 2005-03-30 21:19:
> 
>> Hi!
>>
>> I need to sort 4 lists but I need that they make the "sort together".
>> I'll sort just one but when I change the position of the items of the
>> 1st list I have to change the positions of the other 3 lists. Can I do
>> this just using the sort() method of the list object?
>> If I can't, someone know a site that have one sort method in python that
>> its easily to implement and fast?
>>
>> Tks, Diego
>>
> 
> Hi Diego,
> 
> I'm not quite following your question. Why can't you just sort each list 
> one at a time? Is it that you want a quick way to do that all at once, 
> rather than writing 4 separate sort statements?

<SNIP code to do something else>

> If that's not what you meant, perhaps you can clarify your desire?
> 
> HTH,
> 
> Brian vdB

I see from Kent and Max's replies that the question was clear, but at 
least one reader wasn't. Oops.  :-)

Brian



More information about the Tutor mailing list