写文件
import pickle a={"a":1,"b":2} save_file=open('test.json','wb') pickle.dump(a,save_file) save_file.close()
读文件
import pickle load_file=open('test.json','rb') a=pickle.load(load_file) load_file.close()