We use Python 3.6

go back Level: Intermediate (img: IM / score: 3) level Bite 18. Find the most common word

47 out of 51 users completed this Bite ...
Will you be Pythonista #48 to crack this Bite?
Average Bite difficulty 1-10 rating: 6.43
» Up for a challenge? 💪

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

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

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

Check the tests for more info - have fun!

Github login button