Removing Elements from lists stored under keys in a Dictionary


How do I remove an element in a list, that is under a key in a dictionary?


the function remove function like this

backpack = ['xylophone', 'dagger', 'tent', 'bread loaf']

in his case I want to remove "dagger"


but what if the list is inside a dictionary wizmarco?


in the dictionary

inventory = {

'gold' : 500 + 50,
'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']


from backpack remove dagger


thank you thank you thank you :slightly_smiling: :slightly_smiling: :slightly_smiling: