0
What is wrong with this code? Can someone help me. I was solving the sololearn community task and it seemed not to work.
animal = {"Lion":"Grr","Tiger":"Rawr","Snake":"Ssss","Chirp":" Bird"} sound = input() test = sound.split(' ') for s in test: for k, v in animal.items(): if s == v: print(k," ",end ="")
2 RĂ©ponses
+ 4
You use animal as the key and their sounds as the value, except the bird which you did it oppositely.
Also, there will be 2 spaces between each animal, whereas the desired is one.
0
Oooh I see did not even see that đČđčđ€đ€ thank you very much