I have the following list:
['God: 250', 'Noob: 0', 'Bot: 20']
I would like to sort the list in ascending order using the numbers at the end of each element. The end product should look something like this:
['Noob: 0', 'Bot: 20', 'God: 250']
I have had a look at other solutions in this question but have had no luck. Any help is appreciated.
SOLUTION
list.sort(key=lambda x: int(x.split(":")[1].strip()))