python 读写json文件
2019-03-09 本文已影响0人
戒灵
写:
with open('./1.json', 'w') as f:
f.write(json.dumps(self.request_cookie))
读
with open('./1.json','r') as f:
data = json.load(f)
写:
with open('./1.json', 'w') as f:
f.write(json.dumps(self.request_cookie))
读
with open('./1.json','r') as f:
data = json.load(f)