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 รขโ‚ฌยฆ Ultimately it probably doesn't have a safe. get method because a dict is an associative collection (values are associated with names) where it is inefficient to check if a key is present (and รขโ‚ฌยฆ

Recommended for you