[Tutor] sorting the list
siddharth karandikar
siddharth178@hotmail.com
Wed Feb 26 07:12:24 2003
i have list like this
>>>a = ['a1', 'a2', 'a3', 'a4', 'a10', 'a11', 'a12']
>>>a
['a1', 'a2', 'a3', 'a4', 'a10', 'a11', 'a12']
when i call
>>>a.sort()
list becomes
>>>a
['a1', 'a10', 'a11', 'a12', 'a2', 'a3', 'a4']
**# here a10 is getting ahead of a2 a3 etc
>>>
but i need the list to be sorted like
a1 a2 a3 a4 ... a10 a11 etc.
any possible solution ???
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus