I have a list that consists of details like this:
list1 = ["1", "100A", "342B", "2C", "132", "36", "302F"]
I want to sort this list, such that the values are in the following order:
list1 = ["1", "2C", "36", "100A", "132", "302F", "342B"]
Just doing list1.sort()
obviously doesn't give the correct answer -
it gives:
list1 = ["1", "100A", "132", "2C", "36", "302F", "342B"]
I'm assuming this is because Python treats all these as strings directly. However, I want to sort them based on their numeric value FIRST, and then the character that follows the number.
How do I proceed?