Changing Your Mind


I am stuck in this exercise and I need help please.

zoo_animals = { 'Unicorn' : 'Cotton Candy House',
'Sloth' : 'Rainforest Exhibit',
'Bengal Tiger' : 'Jungle House',
'Atlantic Puffin' : 'Arctic Exhibit',
'Rockhopper Penguin' : 'Arctic Exhibit'}
del zoo_animals['Unicorn']
del zoo_animals['sloth']
del zoo_animals['Bengal Tiger']
zoo_animals['Rockhopper Penguin'] = "North_Pole" :grin:

print zoo_animals

File "python", line 15
'Rockhopper Penguin' = North Pole
SyntaxError: invalid syntax

Oops, try again. Your code looks a bit off. Double check the examples in the instructions if you need help! Your code threw the following error: invalid syntax (python, line 15)

the error is from the code next to the happy face. please let me know what I did wrong?

Replace this line with your code.


'Rockhopper Penguin' is a key for your animals dictionary, so you will need the following syntax:


to get the value, which you can the update


@stetim94 Thank you and I've also noticed that I misspelled the "sloth" as it should be "Sloth"
I used this code and it worked! :slight_smile: