kyu_4.most_frequently_used_words package

Submodules

kyu_4.most_frequently_used_words.solution module

Most frequently used words in a text

kyu_4.most_frequently_used_words.solution.top_3_words(text: str) → list[source]

Given a string of text (possibly with punctuation and line-breaks), returns an array of the top-3 most occurring words, in descending order of the number of occurrences.

Parameters

text – a string of text

Returns

an array of the top-3 most occurring words

kyu_4.most_frequently_used_words.test_top_3_words module

class kyu_4.most_frequently_used_words.test_top_3_words.Top3WordsTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing top_3_words

test_top_3_words()[source]

Test top_3_words function

Module contents