It's dangerous to go Alone! Take This: What is wrong?


#1

inventory = {'pocket':['seashell','strange berry', 'lint']}

inventory['backpack'].sort()
inventory['pouch'].sort()
inventory['dagger'].remove()

throwing an error: Traceback (most recent call last):
File "python", line 16, in
KeyError: 'backpack'


#2

can i see your full code? If this is your full code, inventory doesn't contain a backpack. You might want to reset in this case, given the exercise should contain a lot more code


#3

The error has been resolved, the problem was compiler executing the previous code, Some error with resetting.