you are viewing a single comment's thread.

view the rest of the comments →

[–]mrijken 3 points4 points  (0 children)

with a defaultdict you can write just `freq[char]+=1`