1import pickle
2# load : get the data from file
3data = pickle.load(open(file_path, "rb"))
4# loads : get the data from var
5data = pickle.load(var)
1import pickle
2# dump : put the data of the object in a file
3pickle.dump(obj, open(file_path, "wb"))
4# dumps : return the object in bytes
5data = pickle.dump(obj)