I'm in the middle of making a leaderboard, currently I am taking data from a txt file and dumping it into a list.
The list's format looks something like this:
[['56', 'UsernameA'], ['73', 'UsernameB'], ['52', 'UsernameC'], ['10', 'UsernameD']]
I would like to create a leaderboard, therefore I would like to sort the list from the highest number to the lowest, I've tried using the sort()
function, however this only works on integers and my list contains the username and the score, so I cannot convert it into an integer, unless I'm completely wrong here.