I have a dictionary with a name and a value. I want a way to sort for value and pick the name. Remind that the value will change, and this function will be called many times in the program
for example my dictionary is {"username" : score}
i'm searching a way to pick the username of the top 4 user with the highest score
thank you so much
source https://stackoverflow.com/questions/72279870/i-have-to-sort-a-list-by-value-and-pick-the-relative-key
Comments
Post a Comment