Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Popular Words by tokiojapan55
def popular_words(text: str, words: list) -> dict:
result = {word:0 for word in words}
for word in text.split():
word = word.lower()
if word in result:
result[word] = result[word] + 1
return result
June 22, 2020
Comments: