Python: character sort
In [2]:
aa=['letter','High','good','Mon','apple','Banana','tomorro','tomato']
In [3]:
aa.sort()
In [4]:
aa
Out[4]:
In [5]:
aa.sort(key=str.lower)
In [6]:
aa
Out[6]:
aa=['letter','High','good','Mon','apple','Banana','tomorro','tomato']
aa.sort()
aa
['Banana', 'High', 'Mon', 'apple', 'good', 'letter', 'tomato', 'tomorro']
aa.sort(key=str.lower)
aa
['apple', 'Banana', 'good', 'High', 'letter', 'Mon', 'tomato', 'tomorro']