Need Help sorting alphabetically.

Chris Arai chris at
Tue Dec 19 03:21:37 EST 2000


This seems like it should be obvious, but it is evading me!

I would like to sort alphabetically (I'm not sure that is the correct
term) so that strings of alpha numerics sort alphabetically instead of
by ASCII order.

>>> m=['Pg95_100.GIF',
>>> m.sort()
>>> m
['Pg10_100.gif', 'Pg95A_100.gif', 'Pg95_100.GIF', 'Pg9A_100.gif',

I would like the order to be
['Pg9_100.GIF', 'Pg9A_100.gif', 'Pg10_100.gif, 'Pg95_100.GIF',
Pg95A_100.gif' ]

What is the obvious answer??


Chris Arai
Arai Design
chris at
707 431 1299
FAX 431 1599

-------------- next part --------------
A non-text attachment was scrubbed...
Name: chris.vcf
Type: text/x-vcard
Size: 224 bytes
Desc: Card for Chris Arai
URL: <>

More information about the Python-list mailing list