Changing Your Mind


#1


# key - animal_name : value - location 
zoo_animals = { 'Unicorn' : 'Cotton Candy House',
'Sloth' : 'Rainforest Exhibit',
'Bengal Tiger' : 'Jungle House',
'Atlantic Puffin' : 'Arctic Exhibit',
'Rockhopper Penguin' : 'Arctic'}
# A dictionary (or list) declaration may break across multiple lines

# Removing the 'Unicorn' entry. (Unicorns are incredibly expensive.)
del zoo_animals['Unicorn']
del zoo_animals['Sloth' , 'Bengal Tiger']



print zoo_animals

I don't get it. it says I spelled it wrong. BUT HOW!!!???


#5

I don't think we can delete a list of members, only one member at a time.

# Your code here
del zoo_animals['Sloth']
del zoo_animals['Bengal Tiger']

#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.