-
-
Save codecademydev/f138702f610ba295f729e41ac0316e77 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment