inventory = {
'gold' : 500,
'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf'],
'pocket': ['seashell','strange berry','lint']
}
如何将50添加到存储在' gold'键
答案 0 :(得分:0)
小学,沃森:
inventory['gold'] += 50