I've got a file where each line is in the following format: string, number
For example:
whats up, 843
peace out, 23
hello, 91
hi, 11
see ya later, 5
I would like to order the file in ascending order, by the number value on the right side of the comma.
For example:
see ya later, 5
hi, 11
peace out, 23
hello, 91
whats up, 843
I know in python you can use the sorted() method to sort a list of numbers in ascending order, but I'm not exactly sure how I would extract the number on the right side of the comma and sort the file.