dict = {
"河北": {
"石家庄":{"晋州市","平山县","元氏"},
"邯郸": {"永年","涉县","磁县"},
},
"河南": {
"郑州": {"新郑","荥阳","新密"},
"周口": {"项城","淮阳","太康"},
}
}
inp1 = input("用户输入省份:")
for i in dict[inp1]:
print(i)
inp2 = input("用户输入城市:")
for j in dict[inp1][inp2]:
print(j)
原文地址:https://www.cnblogs.com/wssaried/p/9862688.html
时间: 2024-10-15 16:18:10