14. It's Dangerous to Go Alone! Take This


#1

I need help with this code

inventory = {
'gold' : [500, 50],
'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf'] ,
'pocket': ['seashell','strange berry','lint'],
}
inventory['burlap bag'] = ['apple', 'small ruby', 'three-toed sloth'],
inventory['pouch'].sort()
inventory['backpack'].sort()
inventory['backpack'].remove("dagger")
ininventory['gold']=inventory['gold']+50


#2

This should just be,

    'gold' : 500,

This should not be in the original dictionary.

# Adding a key 'burlap bag' and assigning a list to it
inventory['burlap bag'] = ['apple', 'small ruby', 'three-toed sloth']

#3

A post was split to a new topic: Did you accidentally delete the inventory dictionary