Sorting x lists based on one list ... maybe an example would make sense:
Philippe C. Martin
philippe at philippecmartin.com
Tue May 17 10:45:44 EDT 2005
l1 = ['a','b','c']
l2 = ['toto','titi','tata'] # 'toto' refers to 'a', 'titi' to b' ....
l3 = ['foo','bar','doe'] # 'foo' refers to 'a' ........
I want to reverse sort l1 and have l2 and l3 follow accordingly.
Regards,
Philippe
Philippe C. Martin wrote:
> Hi,
>
> I'm looking for an easy algorithm - maybe Python can help:
>
> I start with X lists which intial sort is based on list #1.
>
> I want to reverse sort list #1 and have all other lists sorted
> accordingly.
>
> Any idea is welcome.
>
> Regards,
>
> Philippe
More information about the Python-list
mailing list