Can you correct my code?


#1

I got the same thing! Can you correct my code?

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']
inventory["pocket"] = ['seashell', 'strange berry','lint')
# Sorting the list found under the key 'pouch'
inventory['pouch'].sort() 

# Your code here
inventory["backpack"].sort()
inventory['backpack'].remove('dagger')
inventory[gold] += 50

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

What error message are you getting? Syntax error?

Check the closing bracket.


#3

Thanks! Figured it out