Sorting list (maybe stupid)

Järvinen Petri jarvin24 at lehtori.cc.tut.fi
Tue Jun 11 05:37:58 EDT 2002


Hey,

I have a problem and can't solve it:

There is lines of text like:

2. Header2
1. Header1
102. Header102

and so on...

And I need to sort them according to the number (1,2,3,4...)

Am I missing something.. I have tried to split the lines by whitespace and 
create lists. But how can i sort the list by first element...

Thanks, Petri



More information about the Python-list mailing list