Address_info = {
"China": {
"Shanxi": {
"Taiyuan": ["Small Shop", "Yinze"],
"Changzhi": ["eldest son", "Changzhi County"]
},
"Shaanxi": ["Hanzhong", "Xianyang"],
"Hebei": ["Shijiazhuang", "Handan"]
},
"United States": {
"New York": ["a", "B"],
"Miami": ["C", "D"],
"Houston": ["E", "F"]
}
}
Exit_flag = True
While Exit_flag:
For I in Address_info:
Print (i)
Choice = input ("Select Enter 1>>:")
If choice in Address_info:
While Exit_flag:
For I2 in Address_info[choice]:
Print ("\ T", I2)
Choice2 = Input ("Select Enter 2>>:")
If Choice2 in Address_info[choice]:
While Exit_flag:
For I2 in Address_info[choice][choice2]:
Print ("\ T", I2)
Choice3 = Input ("Select Enter 3>>:")
If Choice3 in Address_info[choice][choice2]:
While Exit_flag:
For i3 in Address_info[choice][choice2][choice3]:
Print ("\ T", i3)
Choice4 = input ("Press B to return:")
if Choice4 = = "B":
Break
elif Choice4 = = "Q":
Exit_flag = False
if choice3 = = "B":
Break
elif Choice3 = = "Q":
Exit_flag = False
if Choice2 = = "B":
Break
elif Choice2 = = "Q":
Exit_flag = False
if choice = = "B":
Pass
elif Choice = = "Q":
Exit_flag = False
Python Level three menu operation