I'm trying to display some results in a human-readable way. For the purposes of this question, some of them are numbers, some are letters, some are a combination of the two.
I'm trying to figure out how I could get them to sort like this:
input = ['1', '10', '2', '0', '3', 'Hello', '100', 'Allowance']
sorted_input = sorted(input)
print(sorted_input)
Desired Results:
['0', '1', '2', '3', '10', '100', 'Allowance', 'Hello']
Actual results:
['0', '1', '10', '100', '2', '3', 'Allowance', 'Hello']
I'm having trouble coming up with how to do this.