I have a list that has some chapter numbers in string. When I sort the keys using keys function, it gives me wrong results.
keys = ['1.1', '1.2', '2.1', '10.1'] keys.sort() print keys ['1.1', ...
I have a string which needs to be sorted based on the sort_fmt. Ex: If the string is 'abdcdfs' & the sort_fmt is 'dacg'. Upon sort, the output should be 'ddacfbs'. ...
sort_fmt
So I have a large set of data that looks like this
[('ART', [100, 234, 830, 304]), ('MATH', [600, 1400, 300, 340]), ('HISTORY', [2010, 300, 400, 600])]