主页
Python
Python 字典(Dictionary) update() 方法
demo_ref_dictionary_update
运行 ❯
×
更改方向
保存代码
更改主题
car = { "brand": "Ford", "model": "Mustang", "year": 1964 } car.update({"color": "White"}) print(car)
{'brand': 'Ford', 'model': 'Mustang', 'year': 1964, 'color': 'White'}