I want to sort a list containing integers as chars. e.g:
l = ['1', '10', '11', '12', '16', '17', '2', '24', '26', '27', '28', '30', '32', '34', '35', '36', '43', '45', '47', '49', '50', '6', '9']
print(sorted(l))
is returning:
['1', '10', '11', '12', '16', '17', '2', '24', '26', '27', '28', '30', '32', '34', '35', '36', '43', '45', '47', '49', '50', '6', '9']
why sorted() is acting unusually?