建个大型网站需,江门网站排名优化,中国建设银行网站宁波网点,唐山营销型网站制作menu {北京:{海淀:{五道口:{soho:{},网易:{},google:{}},中关村:{爱奇艺:{},汽车之家:{},youku:{},},上地:{百度:{},},},昌平:{沙河:{老男孩:{},北航:{},},天通苑:{},回龙观:{},},朝阳:{},东城:{},},上海:{闵行:{人民广场:{炸鸡店:{}}},闸北:{火车战:{携程:{}}},浦…menu {北京:{海淀:{五道口:{soho:{},网易:{},google:{}},中关村:{爱奇艺:{},汽车之家:{},youku:{},},上地:{百度:{},},},昌平:{沙河:{老男孩:{},北航:{},},天通苑:{},回龙观:{},},朝阳:{},东城:{},},上海:{闵行:{人民广场:{炸鸡店:{}}},闸北:{火车战:{携程:{}}},浦东:{},},山东:{},}二逼青年版while True:for key in menu:print(key)choice input(:)if len(choice) 0: continueif choice not in menu:continuewhile True:for key2 in menu[choice]:print(key2)choice2 input(:)if len(choice2) 0: continueif choice2 b: breakif choice2 not in menu[choice]: continuewhile True:for key3 in menu[choice][choice2]:print(key3)choice3 input(:)if len(choice3) 0: continueif choice3 b: breakif choice3 not in menu[choice][choice2]: continuewhile True:for key4 in menu[choice][choice2][choice3]:print(key4)choice4 input(:)if len(choice4) 0: continueif choice4 b: breakif choice4 not in menu[choice][choice2][choice3]: continue文艺青年版current_level menulast_level []while True:for key in current_level:print(key)choice input(:)if len(choice) 0:continueif choice b:if not last_level : breakcurrent_level last_level[-1]last_level.pop()if choice not in current_level:continuelast_level.append(current_level)current_level current_level[choice]作者terrybloghttp://www.cnblogs.com/kkterry/Weibohttp://weibo.com/kkterryE-maildoubleginger163.com欢迎转载还请标明出处多谢多谢本条技术文章来源于互联网如果无意侵犯您的权益请点击此处反馈版权投诉本文系统来源php中文网TAG标签python