标签:product put 退出 分类 git NPU rod serve lse
menu = {‘PS‘:{ ‘EPC‘:{‘USN‘, ‘UGW‘,‘CG‘,‘DNS‘ },
‘UPCC‘:{‘PCRF‘, ‘SPR‘,‘SW‘}},
‘CS‘: {‘IMS‘: {‘CSCF‘, ‘AF‘},
‘GSM‘:{‘UMG‘, ‘SERVER‘}}
}
while True:
for i, j in enumerate(menu, 1):
print(i, j)
classify_num = input(‘请选择想要查看的网络分类的编号[退出:q]:‘)
if classify_num.isdigit():
classify_num = int(classify_num)
if 1 <= classify_num <= len(menu):
f_list = list(menu.keys())
sub_net = menu[f_list[classify_num - 1]]
print(‘‘.center(50, ‘-‘))
for i, j in enumerate(sub_net, 1):
print(i, j)
input_num2 = input(‘请选择想要查看的编号[退出:q,输入其他返回主菜单]:‘)
if input_num2.isdigit():
input_num2 = int(input_num2)
if 1 <= input_num2 <= len(sub_net):
s_list = list(sub_net.keys())
product = sub_net[s_list[input_num2-1]]
print(‘‘.center(50, ‘-‘))
for i, j in enumerate(product, 1):
print(i, j)
input_num3 = input(‘请选择想要查看的编号[退出:q,输入其他返回主菜单]:‘)
if input_num3.upper() == ‘Q‘:
print(‘感谢您的使用!!‘)
exit()
else:
print(‘输入错误,请重新输入!!‘)
elif input_num2.upper() == ‘Q‘:
print(‘感谢您的使用!!‘)
exit()
else:
print(‘输入错误,请重新输入!!‘)
elif classify_num.upper() == ‘Q‘:
print(‘感谢您的使用!!‘)
exit()
else:
print(‘输入错误,请重新输入!!‘)
标签:product put 退出 分类 git NPU rod serve lse
原文地址:https://www.cnblogs.com/zqyun/p/9612566.html