03-2 : Count characters in your string
This is a CodeWars problem that requires returning a HashMap of the count of characters within a string.
Approach 1: HashMap
def count(s):
letterCount = {}
for c in s:
letterCount[c] = 1 + letterCount.get(c, 0)
return letterCount
...
rohanmorar.hashnode.dev1 min read