python通讯录
发布时间: 2024-07-20 09:46:27
㈠ python缂栦竴娈靛皬绋嫔簭
phonebook={
'Alice':{
'phone':'2341',
'addr':'Foodrive23'
},
'Beth':{
'phone':'1213',
'addr':'Bazavenue90'
},
'Ceil':{
'phone':'3219',
'addr':'Bazavenue90'
}
}
key=input("璇疯緭鍏ユ偍瑕佹煡镓剧殑濮揿悕锛")
#forkeyinphonebook:
ifkeyinphonebook.keys():
print(phonebook[key])
else:
print("娌℃湁",key,'镄勪俊鎭')
#鐢╬ython3.4鏀圭殑锛屼釜鍒鍑芥暟鍙浠ヨ嚜琛屾浛鎹
热点内容