contacts = {
'name':'张三',
'sex':"男",
'salary':'8000'
}
print(contacts.get('name')) # 按键访问值
print(contacts.get('age')) # 按键访问值,键不存在返回None
print(contacts.get('age','默认值')) # 按键访问值,键不存在返回默认值