标签:inpu 清华 医院 input 儿童 三级 大学 pre put
dic={
‘昌平区‘:{
‘昌平中医医院‘:[‘骨科‘,‘眼科‘,‘口腔科‘],
‘清华长庚医院‘:[‘骨科‘,‘眼科‘,‘口腔科‘],
‘回龙观社区医院‘:[‘骨科‘,‘眼科‘,‘口腔科‘],
},
‘顺义区‘:{
‘顺义中医医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘顺义医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘顺义社区医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
},
‘东城区‘:{
‘协和医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘口腔医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘301医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
},
‘西城区‘:{
‘北京大学第一医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘北京积水潭医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘首都医科附属医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
},
‘海淀区‘:{
‘北医三院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘人民解放军总医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘空军总医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
},
‘朝阳区‘:{
‘儿童医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘武警北京总队医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
‘航空医院‘: [‘骨科‘, ‘眼科‘, ‘口腔科‘],
}
}
shiqu=[]
for item in dic:
shiqu.append(item)
print(shiqu)
flag=True
while flag:
shqu_choice=input("shiqu:").strip()
if len(shqu_choice)==0:continue
elif shqu_choice not in shiqu:
print("shiqu out range")
continue
else:
while flag:
hospital=[]
for item in dic[shqu_choice]:
hospital.append(item)
print(hospital)
hospital_choice=input(‘hospital:‘).strip()
if len(hospital_choice)==0:continue
elif hospital_choice not in hospital:
print(‘hospital out range‘)
continue
else:
while flag:
keshi=[]
for item in dic[shqu_choice][hospital_choice]:
keshi.append(item)
print(keshi)
keshi_choice=input(‘keshi:‘)
if len(keshi_choice)==0:continue
elif keshi_choice not in keshi:
print(‘keshi out range‘)
continue
flag=False
标签:inpu 清华 医院 input 儿童 三级 大学 pre put
原文地址:http://www.cnblogs.com/lalashou/p/7867416.html