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