sort one list using the values from another list

Magnus Lycka lycka at carmen.se
Mon Feb 27 09:07:13 EST 2006


Dolmans Sun wrote:
> 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.

Is there something here I can't see, or did you just
change a variable name and present that as another
solution?




More information about the Python-list mailing list