avatar Bite 18. Find the most common word

Write a function that returns the most common (non stop)word in this Harry Potter text.

Make sure you convert to lowercase, strip out non-alphanumeric characters and stopwords. Your function should return a tuple of (most_common_word, frequency).

The template code already loads the Harry Potter text and list of stopwords in.

Check the tests for more info - have fun!

Login and get coding
go back Intermediate level
Bitecoin 3X

551 out of 566 users completed this Bite.
Will you be the 552nd person to crack this Bite?
Resolution time: ~63 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.1 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Focus on this Bite hiding sidebars, turn on Focus Mode.

Ask for Help