Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Counter solution in Clear category for Popular Words by rodka81
from collections import Counter
def popular_words(text: str, words: list) -> dict:
c = Counter([w.lower() for w in text.split()])
return {w: c[w] for w in words}
Aug. 28, 2018
Comments: