def popular_words(text: str, words: list) -> dict:
# your code here
text = text.lower().replace('\n', ' ').split(' ')
palabras = {}
for w in words:
if w in text:
palabras[w] = (text.count(w))
else:
palabras[w] = (text.count(w))
return palabras
Created at: 2019/12/23 21:02; Updated at: 2019/12/24 13:26