13. Remove a Few Things


I keep getting the following error.

"Oops, try again. backpack has to be a list! Click Reset Code to get back to the original code."

What do you think I am doing wrong?

I am expecting to remove 'dagger' from the list

Replace this line with your code. 

backpack = ['xylophone', 'dagger', 'tent', 'bread loaf']
print backpack



backpack = ['xylophone', 'dagger', 'tent', 'bread loaf']

will not at a list to your dictionary. It will overwrite your dictionary with a list


Okay. So how do you fix this? I am unsure.


add the list to your dictionary? don't overwrite your dictionary


What? I'm confused.

So add the list to my dictionary?


yea, look:

backpack = ['xylophone', 'dagger', 'tent', 'bread loaf']
print backpack

see how backpack is a list now? It was a dictionary, it was suppose to stay a dictionary and the list should be added to the dictionary.

if you need a syntax refresher, see 11. new entries


Thank you. Such a small thing but it made all the difference.