ppython pickle code example
Example 1: pickle dump
import pickle
with open('Fruits.obj', 'wb') as fp:
pickle.dump(banana, fp)
Example 2: write data to using pickle
import pickle
example_dict = {1:"6",2:"2",3:"f"}
pickle_out = open("dict.pickle","wb")
pickle.dump(example_dict, pickle_out)
pickle_out.close()