You have an exercise consisting of typing an N number and then typing a word and a quality into N lines. After this I must enter a sentence. If in this sentence there is a word that I had typed before, you should print their respective quality. Example
ENTRY
3 boldo explosiva tampa chorosa beijo calorosa Vocˆe pˆos a tampa no boldo ?
Output
chorosa explosiva
My code is this one but it does not work.
dic={}
lista=[]
n=int(input())
for i in range(n):
dic["palavra"],dic["adjetivo"]=input().split()
lista.append(dic.copy())
frase=input()
for i in frase:
if i in dic["palavra"]:
print(dic["adjetivo"])