Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Dict comprehension solution in Clear category for Popular Words by CDG.Axel
def popular_words(text: str, words: list) -> dict:
lst = text.lower().split()
return {w: lst.count(w) for w in words}
March 15, 2023