Yahoo: How to Get Rid of a Hickey So You Can Stop Wearing Turtlenecks Everywhere
How to Get Rid of a Hickey So You Can Stop Wearing Turtlenecks Everywhere
AOL: How Do You Get Rid of a Hickey Fast? Asking for a Friend...
"Hearst Magazines and Yahoo may earn commission or revenue on some items through these links." Not like I would know from personal experience or anything, but there are a lot of bogus hacks to get rid ...
How Do You Get Rid of a Hickey Fast? Asking for a Friend...
AOL: How to Get Rid of a Hickey as Fast as Possible
WFLA News Channel 8: ‘What’s that bruise?’ Here’s how to get rid of that hickey before family Thanksgiving
‘What’s that bruise?’ Here’s how to get rid of that hickey before family Thanksgiving
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 ...