Skip to content

Instantly share code, notes, and snippets.

@mewforest
Created January 15, 2019 11:33
Show Gist options
  • Save mewforest/70d282887881f63e1a704ecb5bd711b0 to your computer and use it in GitHub Desktop.
Save mewforest/70d282887881f63e1a704ecb5bd711b0 to your computer and use it in GitHub Desktop.
import pickle
# write pickle
file_write = open('pin.dat', 'wb')
a = list(range(1000))
pickle.dump(a, file_write)
file_write.close()
# read pickle
file_read = open('pin.dat', 'rb')
v = pickle.load(file_read)
file_read.close()
print(v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment