Python Python Collections Dictionaries Word Count

eestsaid
eestsaid
1,311 Points

Word count challenge - where to start

Not really sure where to start with this one. Steps Im thinking about are:

  • Change the string to a list using split
  • Run a for loop to get the count of each word and put the word and the count in a new list
  • Change the list to a dictionary

Problem with the above it doesn't really draw on recent content so seems arbitrary and the most common method I've been able to find t change a list to dictionary is using the dict() method.

Do the above steps sound like I might be on the right path???

Thanks team

2 Answers

bot .net
bot .net
11,911 Points

you are close!

You also need to use nested for loop and a counter

eestsaid
eestsaid
1,311 Points

Thanks bot.net - I've taken a breather from this challenge and will come back to it. I will let you know how I go.