def pickle_load(file_path):
f = open(file_path,‘r+‘)
data = pickle.load(f)
f.close()
return data
def pickle_dump(file_path,data):
f = open(file_path,‘wb‘)
pickle.dump(data,f)
f.close()
时间: 2024-10-16 05:26:52
def pickle_load(file_path):
f = open(file_path,‘r+‘)
data = pickle.load(f)
f.close()
return data
def pickle_dump(file_path,data):
f = open(file_path,‘wb‘)
pickle.dump(data,f)
f.close()