字典的新建

dic = {}
dic["name"] = "jac"
dic["年龄"] = 24
dic["爱好"] = "chatting"
print(dic)



结果:

{'name':"jac", "年龄":24, "爱好": "chatting"}     {'name': 'jac', '年龄': 24, '爱好': 'chatting'}
posted @ 2018-10-28 22:34  Jack的逆旅  阅读(96)  评论(0编辑  收藏  举报