Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2line solution in Clear category for Popular Words by wooilkim
from collections import Counter
def popular_words(text: str, words: list) -> dict:
counter = Counter(text.lower().split())
return dict((word, counter[word]) for word in words)
May 27, 2021
Comments: