I have the following list:
l = ['50%','12.5%','6.25%','25%']
Which I would like to sort in the following order:
['6.25%','12.5%','25%','50%']
Using l.sort () gives:
['12.5%','25%','50%','6.25%']
Any cool tricks to easily sort these lists in Python?
source
share