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 greek
def popular_words(text: str, words: list) -> dict:
text_arr = list(text.lower().split()) #Turn text into array of lowercase words
return {key:text_arr.count(key) for key in words} #Return dictionary with key words and number as a value
#of how much this key was met in text array
Oct. 5, 2020