Did you accidentally delete the `inventory` dictionary? Click Reset Code to get back to the original code


#1

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

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['pocket'] : ['seashell', 'strange berry', 'lint']
inventory['backpack'].sort()
inventory['backpack'].remove('dagger')
inventory['gold'] += 50

I don't know what's going on with my code.It just keeps telling me Did you accidentally delete the inventory dictionary? Click Reset Code to get back to the original code.


#2

This line needs = since it is an assignment statement that is not inside the dictionary.

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

#3

thx,i figured it out.


#4

A post was split to a new topic: Can you correct my code?


#5

2 posts were split to a new topic: Something wrong with 'backpack'


#6