I cannot find an answer elsewhere on this site, which is why I am asking. My answer is different as it contains alpha-numeric values and will not work with any integer based solution here is a sample of my string:
01768
01785
01799
01804
01818
01821
01835
01849
01852
01866
XXXXX
What can i do to sort these in ascending/descending order, so far i have tried sorted()
as it is used for stings, the output of this is ['0', '1', '6', '6', '8'] ['X', 'X', 'X', 'X', 'X']
. i want each separate value to be ordered and not individual characters. Any help is appreciated.