Its dangerous to go alone, take this


#1



https://www.codecademy.com/courses/python-beginner-en-pwmb1/2/5?curriculum_id=4f89dab3d788890003000096#

Oops, try again. Did you accidentally delete the inventory dictionary? Click Reset Code to get back to the original code.
File "python", line 5
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']
^
SyntaxError: invalid syntax


Replace this line with your code. 
inventory = {
    'gold' : 500,
    'pouch' : ['flint', 'twine', 'gemstone'],
    'pocket':['seashell', 'strange berry', 'lint']# Assigned a new list to 'pouch' key
    'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']
}
inventory['backpack'].sort()
inventory['backpack'].remove('dagger')
inventory['backpack']+=50
# 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['gold'].sort() 

# Your code here


#2

I corrected line 9 with the should be gold not backpack


#3

still got the same error messages however


#4

Missing comma at end is breaking the hash. Also, does gold need to be sorted? Isn't it just a number?


#5

ty for the comma thats sorted
Removed the sort part out,
completed it yay


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.