Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dictionaries Word Count

i solved this challenge with (Counter) class

i googled a way to to count item occurrences in list and i found out that there is a class named (Counter) from (collections) library that takes a list and do exactly as i need and returns a dict exactly as the challenge requested

from collections import Counter
def word_count(argument):
    argument = argument.lower()
    words = argument.split()
    return Counter(words)

my question is , was the challenge meant to be solved with this approach or i just hacked my way through ?