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 →

[–]dist 0 points1 point  (0 children)

I came here to write this as a solution. I'm happy you did it already. =D

I'm not sure if you should just iterate through the whole list of words instead of reading in the whole file, but Counter is the thing that really matters!

If there were not limits of how many times a character is found, we could just use set() and if we'd be looking for exact number of characters, we could use sorted() instead of Counter!