立即学习:https://edu.csdn.net/course/play/10443/223258?utm_source=blogtoedu
1.import json #使用 json 需要先import json 模块
2.with open(‘example.json’,'w')as f:
json.dump(a_dict,f) #把a_dict 内容 dump出来存放到 f :example.json中
json.load(f) # 将f :example.json中的内容读取出来