14.Its dangerous



What am i doing wrong here:
inventory['pocket'] = ['seashell', 'strange berry', 'lint']
inventory['gold'] = 50
It says: ops, try again. Check for keys without values or misspelled keys!


instruction step 1 and 2 should be combined, which you did here:

inventory['pocket'] = ['seashell', 'strange berry', 'lint']

so this line:


is no longer needed, remove it.

backpack is part of the inventory dictionary, so if you want to access it you need inventory['backpack']

you add 50 gold, not set the value to 50 gold


Yeah, also, when you are removing the dagger from your list, use which will help you delete dagger from your 'pocket'



i was hoping the learner would get this insight himself after reading this:

If you realize it yourself, it is so powerful