1 ''' 2 info={ 3 'qwe':'poi', 4 'asd':"lkj", 5 'zxc':"mnb" 6 } 7 print(info)#字典是无序的 8 print(info["qwe"])#输出 9 info['qwe']="QWE"#字典中有,则是修改 改 10 info['dfg']="hgf"#没有就是添加的 增 11 print(info) 12 #del info['asd']#删除 删 13 #info.pop('asd')#删除 14 #info.popitem() #随机删 15 print(info) 16 17 print(info.get('qwe'))# 查 18 19 print('dfg' in info)#判断字典中是否含有dfg 20 ''' 21 22 23 ''' 24 #多级字典的嵌套 25 mover={ 26 'china':{ 27 'qwe':['qwe','rty','yui'], 28 'aaa':['asd','dfg','sad'], 29 'bbb':['kk','gh','dd'] 30 }, 31 'japan':{ 32 '11':['22','345'], 33 '99':['88','56'] 34 }, 35 'usa':{ 36 'ASD':['SSS'], 37 'QWE':['GGG',