sort one list using the values from another list

Dolmans Sun dolmens at gmail.com
Mon Feb 27 05:46:37 EST 2006


Kent Johnson wrote:

>   >>> [a for b,a in sorted(zip(B,A))]
also, [a for _,a in sorted(zip(B,A))]

didn't read refs, tested above python-2.2.3.

-- 
Sun Yi Ming

you can logout any time you like,
but you can never leave...



More information about the Python-list mailing list