Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Popular Words by twilyght
from collections import Counter
def popular_words(text: str, words: list) -> dict:
counter = Counter(text.lower().split())
return {x: counter[x] for x in words}
May 3, 2020