日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

三级菜单 python_python三级菜单

發布時間:2023/12/10 python 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 三级菜单 python_python三级菜单 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

menu = {

'北京':{

'海淀':{

'五道口':{

'soho':{},

'網易':{},

'google':{}

},

'中關村':{

'愛奇藝':{},

'汽車之家':{},

'youku':{},

},

'上地':{

'百度':{},

},

},

'昌平':{

'沙河':{

'老男孩':{},

'北航':{},

},

'天通苑':{},

'回龍觀':{},

},

'朝陽':{},

'東城':{},

},

'上海':{

'閔行':{

"人民廣場":{

'炸雞店':{}

}

},

'閘北':{

'火車戰':{

'攜程':{}

}

},

'浦東':{},

},

'山東':{},

}

二逼青年版:while True:

for key in menu:

print(key)

choice = input(">>>:")

if len(choice) == 0: continue

if choice not in menu:continue

while True:

for key2 in menu[choice]:

print(key2)

choice2 = input(">>>:")

if len(choice2) == 0: continue

if choice2 == "b": break

if choice2 not in menu[choice]: continue

while True:

for key3 in menu[choice][choice2]:

print(key3)

choice3 = input(">>>:")

if len(choice3) == 0: continue

if choice3 == "b": break

if choice3 not in menu[choice][choice2]: continue

while True:

for key4 in menu[choice][choice2][choice3]:

print(key4)

choice4 = input(">>>:")

if len(choice4) == 0: continue

if choice4 == "b": break

if choice4 not in menu[choice][choice2][choice3]: continue

文藝青年版:current_level = menu

last_level = []

while True:

for key in current_level:

print(key)

choice = input(">>>:")

if len(choice) == 0:continue

if choice == "b":

if not last_level : break

current_level = last_level[-1]

last_level.pop()

if choice not in current_level:continue

last_level.append(current_level)

current_level = current_level[choice]

作者:terry

blog:http://www.cnblogs.com/kkterry/

Weibo:http://weibo.com/kkterry

E-mail:doubleginger@163.com

歡迎轉載,還請標明出處!多謝多謝!

本條技術文章來源于互聯網,如果無意侵犯您的權益請點擊此處反饋版權投訴

本文系統來源:php中文網

TAG標簽:python

總結

以上是生活随笔為你收集整理的三级菜单 python_python三级菜单的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。