14/14 Any idea about what I am doing wrong?


#1

inventory = {
'gold' : 500,
'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf'],
'pocket' : ['seashell', 'strange berry', 'lint'],
}

Adding a key 'burlap bag' and assigning a list to it

inventory['burlap bag'] = ['apple', 'small ruby', 'three-toed sloth'],

Sorting the list found under the key 'pouch'

inventory['pouch'].sort()

Your code here

inventory['backpack'].sort()
backpack.remove('dagger')
inventory['gold'] + 50

I get the error : ' NameError: name 'backpack' is not defined ' , I have tried restarting this code multiple times, any solutions? (P.S. The indent does not seem to be correct when I post this)


#2

See what I posted recently: