dict1 = {'id':1,'name':'zhangsan','age':11}
# 取元素
n = dict1['name']
# 修改元素 添加元素
dict1['age'] =22
dict1['addr'] ='sz'
# 读出所有的键值对
for k,vin dict1.items():
print(k,v)
# 读出所有的key,value
keys = dict1.keys()
values = dict1.values()
print(keys)
print(values)
# 删除元素
del dict1['name']
print(dict1)