习题五 答案
Posted 萌萌哒小强儿
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了习题五 答案相关的知识,希望对你有一定的参考价值。
1 dic = { 2 "河北":{ 3 "石家庄" :["鹿泉","藁城","元氏"], 4 "邯郸" : ["永年","涉县","磁县"] 5 }, 6 "河南":{ 7 "郑州":["巩义","登封","新密"], 8 "开封":["金明","鼓楼","通许"] 9 }, 10 "山西":{ 11 "太原":["古交","清徐","阳曲"], 12 "大同":["天镇","阳高","广灵"] 13 } 14 } 15 for i in dic: 16 print(i) 17 a = input("请输入城市名称:") 18 for i1 in dic[a]: 19 print(i1) 20 b = input("请输入城市名称:") 21 for i2 in dic[a][b]: 22 print(i2)
以上是关于习题五 答案的主要内容,如果未能解决你的问题,请参考以下文章