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