dic = { 'name':['风花雪月','百炼成钢'], 'py1':{'num':'dir','avg_age':18,}, True:1, (1,2,3):'m', 2:'凤凰', 'age':16 } # dic['age'] = 18 # print(dic) # {'name': ['风花雪月', '百炼成钢'], 'py1': {'num': 71, 'avg_age': 18}, True: 1, (1, 2, 3): 'm', 2: '凤凰', 'age': 18} # dic['name'].append('hehehe') # print(dic) # {'name': ['风花雪月', '百炼成钢', 'hehehe'], 'py1': {'num': 71, 'avg_age': 18}, True: 1, (1, 2, 3): 'm', 2: '凤凰', 'age': 18} # dic['py1']['num'] = dic['py1']['num'].upper() # print(dic)