zoukankan      html  css  js  c++  java
  • Date2

    #Author:Brill
    data = {"Beijing":{
        "Chaoyang":{
            "Shahe":{},"Tiantongyuan":{}
        },"Haiding":{},"Changping":{}
    },"Nanjing":{"Xinjiekou":{},"Muxuyuan":{}},"Shanghai":{}}
    
    exit_flag = False
    
    while not exit_flag:
        for i in data:
            print(i)
    
        choice = input("Please enter1 :")
        if choice in data:
            while not exit_flag:
                for i2 in data[choice]:
                    print("	",i2)
                choice2 = input("Please enter2:")
                if choice2 in data[choice]:
                    while not exit_flag:
                        for i3 in data[choice][choice2]:
                            print("		",i3)
                        choice3 = input("Please enter3:")
                        if choice3 in data[choice][choice2]:
                            for i4 in data[choice][choice2][choice3]:
                                print("		",i4)
                            choice4 = input("Please write B to back")
                            if choice4 == "B":
                                pass
                            elif choice4 =="Q":
                                exit_flag = True
                        if choice3 == "B":
                            break
                        elif choice3 == "Q":
                            exit_flag = True
                if choice2 == "B":
                    break
                elif choice2 == "Q":
                    exit_flag = True
    View Code
    #Author:Brill
    data = {"Beijing":{
    "Chaoyang":{
    "Shahe":{},"Tiantongyuan":{}
    },"Haiding":{},"Changping":{}
    },"Nanjing":{"Xinjiekou":{},"Muxuyuan":{}},"Shanghai":{}}

    exit_flag = False

    while not exit_flag:
    for i in data:
    print(i)

    choice = input("Please enter1 :")
    if choice in data:
    while not exit_flag:
    for i2 in data[choice]:
    print(" ",i2)
    choice2 = input("Please enter2:")
    if choice2 in data[choice]:
    while not exit_flag:
    for i3 in data[choice][choice2]:
    print(" ",i3)
    choice3 = input("Please enter3:")
    if choice3 in data[choice][choice2]:
    for i4 in data[choice][choice2][choice3]:
    print(" ",i4)
    choice4 = input("Please write B to back")
    if choice4 == "B":
    pass
    elif choice4 =="Q":
    exit_flag = True
    if choice3 == "B":
    break
    elif choice3 == "Q":
    exit_flag = True
    if choice2 == "B":
    break
    elif choice2 == "Q":
    exit_flag = True







    你只管努力,其他的交给天意~
  • 相关阅读:
    JSP基础语法:注释、Scriptlet、编译指令
    JDBC的LIKE书写规范
    AWT回顾篇
    1.五子棋预备知识
    对象的生命周期回顾篇
    学习activemq(2)写个简单的程序
    activemq in action(3)剖析JMS消息(转)
    activemq in action(1)
    学习activemq(3)
    hadhoop安装
  • 原文地址:https://www.cnblogs.com/genghenggao/p/9025075.html
Copyright © 2011-2022 走看看