I was over at a friend’s house the other day and saw that she’d gotten a Fingerhut catalog. It had come to her home in the name of a previous resident. But seeing it brought back memories of how, for ...
which bought defunct general merchandise catalog Fingerhut from Federated Department Stores in July, plans to put the Fingerhut book back in the mail on Nov. 9. The company won’t reveal many details ...
The new Fingerhut fall/winter catalog, which dropped Nov. 9, will appeal to the same sub-prime-credit demographic as the old Fingerhut catalog. “That’s what works in our opinion,” said Mary Pernula, ...
The union representing 1,500 Fingerhut employees has made a number of demands on Federated Department Stores Inc. including restarting catalog distribution as a signal that it is serious about selling ...
The sample code in your question is clearly trying to count the number of occurrences of each character: if it already has a count for a given character, get returns it (so it's just incremented by one), else get returns 0 (so the incrementing correctly gives 1 at a character's first occurrence in the string).
As you have found, get just gets the value corresponding to a given key. sorted will iterate through the iterable it's passed. In this case that iterable is a dict, and iterating through a dict just iterates through its keys. If you want to sort based on the values instead, you need to transform the keys to their corresponding values, and of course the obvious way to do this is with get. To ...