主页
Python
Python - 添加字典项
demo_dict_add2
运行 ❯
×
更改方向
保存代码
更改主题
thisdict = { "brand": "Ford", "model": "Mustang", "year": 1964 } thisdict.update({"color": "red"}) print(thisdict)
{'brand':'Ford','model':'Mustang','year':1964,'color':'red'}