标签:pickle name 读取 path handle with file pytho python
用pickle保存中间变量:
with open(‘path/file_name.pickle‘, ‘wb‘) as handle:
pickle.dump(variable_name, handle, protocol=2)
用pickle读取中间变量:
with open(‘path/file_name.pickle‘, ‘rb‘) as handle:
variable_name=pickle.load(handle)
标签:pickle name 读取 path handle with file pytho python
原文地址:https://www.cnblogs.com/HITSZ/p/9057586.html