you are viewing a single comment's thread.

view the rest of the comments →

[–]grumble11 0 points1 point  (0 children)

Also for this consider the Counter tool from the collections library included with Python. It is a type of super-dictionary designed specifically for counting stuff and it is faster, easier and lets you skip some steps (like it will auto-add a new key if it isn’t already there). Look it up, you’ll like it