Skip to content

Instantly share code, notes, and snippets.

@solidpple
Created January 18, 2018 01:42
Show Gist options
  • Save solidpple/3fb2311d4683186cf2fe1ac5ed26d7a3 to your computer and use it in GitHub Desktop.
Save solidpple/3fb2311d4683186cf2fe1ac5ed26d7a3 to your computer and use it in GitHub Desktop.
import pickle
a = {'hello': 'world'}
with open('filename.pickle', 'wb') as handle:
pickle.dump(a, handle, protocol=pickle.HIGHEST_PROTOCOL)
with open('filename.pickle', 'rb') as handle:
b = pickle.load(handle)
print a == b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment