[Tutor] list sorting problem (help!)

Thomi Richards thomi@thomi.imail.net.nz
Sun, 8 Sep 2002 23:41:07 +1200


ok, i have a problem. i have a list, like this:

['email me','My programs','Web Design','Web Hosting']

and i want to sort them, so i can say something like "the link 'My
programs' should ALWAYS appear at the top". i thought I'd use a
weighting system, so the 'My programs' list item would be weighted 0,
and so always appear at the top. the next one would be '1', then '2',
etc. etc. etc. i could give 'contact me' a weighting of 999, so it would
always appear at the bottom.

could i ask some of you python experts to make me a simple procedure
which would do this?? It's for a CGI, which has to load every page, so
the emphasis should be on minimal size and speed.. thanks.

-- 
The software required Win95 or better, so I installed Linux.
Thomi Richards,
thomi@imail.net.nz