pickle dump load code example
Example 1: pickle dump
import pickle
with open('Fruits.obj', 'wb') as fp:
pickle.dump(banana, fp)
Example 2: pickle load
with open('filename', 'rb') as f:
x = pickle.load(f)
import pickle
with open('Fruits.obj', 'wb') as fp:
pickle.dump(banana, fp)
with open('filename', 'rb') as f:
x = pickle.load(f)