Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First one-liner solution in Clear category for Popular Words by Wojtek_Okularczyk
def popular_words(text: str, words: list) -> dict:
return {word: popularity for word, popularity in map(lambda word: (word, text.lower().split().count(word)), words)}
Nov. 8, 2021
Comments: