menu = {
......
}
current_layer = menu
layers = []
while True:
for k in current_layer:
print(k)
choice = input('>:').strip()
if not choice:continue
if choice in current_layer:
layers.append(current_layer)
current_layer = current_layer[choice]
elif choice == 'q':
break
elif choice == 'b':
if len(layers) != 0:
current_layer = layers.pop()
else:
print('-------Top!-------')

最新文章

  1. [UCSD白板题] Primitive Calculator
  2. Android工程师常见面试题集答案
  3. 链接错误-库冲突(libcmt.lib和libcmtd.lib)
  4. Apache Shiro系列教程之三:Shiro的结构
  5. ASCII码对照表 (转)
  6. Filter 过滤器
  7. 一天一个Java基础——通过异常处理错误
  8. T-SQL 运行时生成语句
  9. webrtc学习(二): audio_device之opensles
  10. protocol buffer的简单使用
  11. JAVA程序,SESSION没有关闭导致数据库异常
  12. 16 Socket通信(简单例子)
  13. leetcode Binary Tree Postorder Traversal python
  14. JS - 删除确认
  15. [Ext.Net]TreePanel+gridPanel实例
  16. java项目中通过添加filter过滤器解决ajax跨域问题
  17. Mac osx 系统安装 eclipse
  18. 对Promise的理解?
  19. 解决Navicat Premium终端操作mysql ONLY_FULL_GROUP_BY错误
  20. tomcat 启动 关闭 重启脚本

热门文章

  1. CodeForces 540A Combination Lock (水题)
  2. OpenCV实现pHash哈希
  3. GitHub操作总结
  4. 系统蓝屏stop:ox000007B错误解决方案
  5. 基于JSP+Servlet开发高校社团管理系统(前台+后台) 源码
  6. Javascript 链式作用域 function fn(){}和var fn=function(){}区别
  7. Nutch2.2.1,window,eclipse,安装
  8. 在 CentOS 上运行 ZKEACMS
  9. 三张图片看懂ZKEACMS的设计思想
  10. leetcode 2 两数相加 JAVA