[Tutor] list sort problem

Rayon evosweet at hotmail.com
Sun Sep 20 01:00:54 CEST 2009


ok so here it is I think  this one should be very clear:

I have some data in a list, the data in question: 

0.0046,0.095,0.0904,521456,['MCI 521456 0.0904'],['ATT 521 0.0919'],['IDT 521 0.095'],['None']
0.0083,0.0192,0.0109,39023821,['MCI 39023821 0.0109'],['ATT 39 0.012'],['IDT 39 0.0192'],['SPR 39 0.0135']
0.042,0.0681,0.026,73462,['MCI 73462 0.0260'],['ATT 7 0.026'],['IDT 73462 0.028'],['SPR 7 0.0681']
0.0176,0.1035,0.0859,126872,['MCI 126872 0.0859'],['ATT 1268 0.0919'],['IDT 126872 0.1035'],['None']
0.0215,0.1614,0.1399,5032130,['MCI 5032130 0.1614'],['ATT 5032130 0.1399'],['IDT 503 0.152'],['None']
0.0206,0.0385,0.0179,1868,['MCI 1868 0.0179'],['ATT 1868 0.0385'],['IDT 1868 0.036'],['None']
0.0325,0.087,0.0545,5027889,['MCI 5027889 0.0602'],['ATT 5027889 0.0545'],['IDT 502 0.087'],['None']
0.0325,0.087,0.0545,5027888,['MCI 5027888 0.0602'],['ATT 5027888 0.0545'],['IDT 502 0.087'],['None']
0.0046,0.095,0.0904,521455,['MCI 521455 0.0904'],['ATT 521 0.0919'],['IDT 521 0.095'],['None']
0.1292,0.1762,0.047,5989,['MCI 5989 0.1762'],['ATT 598 0.05'],['IDT 5989 0.173'],['SPR 598 0.047']
0.0706,0.2011,0.1305,1284499,['MCI 1284499 0.2011'],['ATT 1284499 0.1932'],['IDT 1284499 0.1305'],['None']
0.0325,0.087,0.0545,5027881,['MCI 5027881 0.0602'],['ATT 5027881 0.0545'],['IDT 502 0.087'],['None']

my problem is that I want to order it by the first item so for line number one that would be  0.0046: 
this value is not unique it might repeat, if the last 10 values like this that might be the same and there are the lowest in the over list. 
I want them first when I display this list and the bigger  values after in order is size.  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090919/acc322fd/attachment-0001.htm>


More information about the Tutor mailing list