标签:print div log 河北 习题 答案 名称 col pre
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)
标签:print div log 河北 习题 答案 名称 col pre
原文地址:http://www.cnblogs.com/zhangzengqiang/p/7676608.html