SnippetsSnippets# Sorting a dictionary based on valuesnew = sorted(hashmap, key=hashmap.get, reverse=True)