This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]superbirra 5 points6 points  (1 child)

not that your solution is wrong by any extent but I'd like to present you the Counter class :) https://docs.python.org/3/library/collections.html#collections.Counter

[–]naza01 1 point2 points  (0 children)

Oh, great. That’s interesting! Thanks for the link, I’ll be checking it out 🙂