数学建模例题2.9 字典的get()方法使用示例
`Dict={'age':18,'score':[98,97],'name':'Zhang','sex':'male'}
print(Dict['age']) #输出18
print(Dict.get('age')) #输出18
print(Dict.get('address','Not Exists.')) #输出No Exists
try:
print(Dict['address'])
except KeyError:
print('Key "address" does not exist in the dictionary.')
print("学号:3005")`