I tried to sort a list of strings that are actually integers, but I do not get the right sort value. How do I sort it in a way that it is sorted according to the integer values of the string?
a = ['10', '1', '3', '2', '5', '4']
print(sorted(a))
Output:
['1', '10', '2', '3', '4', '5']
Output wanted:
['1', '2', '3', '4', '5', '10']