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.
1 - Install natsort module
pip install natsort
2 - Import natsorted
>>> input = ['1', '10', '2', '0', '3', 'Hello', '100', 'Allowance'] >>> from natsort import natsorted >>> natsorted(input) ['0', '1', '2', '3', '10', '100', 'Allowance', 'Hello']
Source: https://pypi.python.org/pypi/natsort