数据序列化

序列化三种方式:python data = {'one':'one','two':'two'}土方法(文件读写): 序列化写入(文件写入按照打开格式,默认使用str,'b'模式使用encod()):json with open('data','w') as f: f.write(str(data))数据读取: with open('data','r') as f: data = e
相关文章
相关标签/搜索