dict

 

2022-04-24

dict1.pop('name') 删除指定键

Python 字典合并

1
dict1 = {"name": "immwind"}
2
dict2 = {"age": 42}
3
dict1.update(dict2)
4
# dict1 的值为 {'name': 'immwind', 'age': 42}