Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Popular Words by Luke747
def popular_words(text: str, words: list) -> dict:
import re
out = {}
for word in words:
out[word] = len(re.findall(rf'\b{word}\b', text, flags=re.I))
return out
Aug. 4, 2021