Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
without split and re solution in Creative category for Popular Words by oduvan
def popular_words(text: str, words: list) -> dict:
text = " " + text.lower().replace('\n', ' ') + " "
result = {}
for word in words:
result[word] = text.count(" " + word + " ")
return result
May 15, 2018
Comments: