标签:== 芙蓉区 author not tin inpu auth int 返回
#!/usr/bin/evn python
# -*- coding:utf-8 -*-
# Author: Aron
import sys,os
sheng = {‘广东省‘:{‘深圳市‘:[‘宝安区‘,‘罗湖区‘,‘龙岗区‘],‘广州市‘:[‘兰云真‘,‘天河区‘,‘白云区‘]},‘湖南省‘:{‘邵阳市‘:[‘巨口铺‘,‘龙溪铺‘,‘利平乡‘],‘长沙市‘:[‘芙蓉区‘,‘天星区‘,‘雨花区‘]} }
state = False
while not state:
for i in sheng:
print(i)
sr = input("选择省市,或者退出(Q)")
if sr in sheng:
print(sheng[sr].keys())
sr1 = input("选择省市,或者退出(Q)")
if sr1 in sheng[sr]:
print(sheng[sr][sr1])
sr2 = input("选择返回(B),或者退出(Q)")
if sr2 == ‘B‘:
continue
else:
sys.exit()
elif sr1 == ‘B‘:
continue
else:
sys.exit()
else:
sys.exit()
标签:== 芙蓉区 author not tin inpu auth int 返回
原文地址:http://www.cnblogs.com/huangbipeng/p/7581388.html