python字典简单的三层嵌套
因为在网上没找到简单的创建三层字典的方法所以自己摸索着写了,直接上代码menu = {}city1 =['bj']citybj_1 =['cy','hd']citybj_1_gs =['sohu','bd']for i in city1: for j in citybj_1: for k in citybj_1_gs: menu[i]={} menu[i][j]={} menu[i][j][k]=