Skip to content

Instantly share code, notes, and snippets.

@BexTuychiev
Created July 14, 2020 06:31
Show Gist options
  • Save BexTuychiev/d3c10633580262aeb54e64241700d248 to your computer and use it in GitHub Desktop.
Save BexTuychiev/d3c10633580262aeb54e64241700d248 to your computer and use it in GitHub Desktop.
import pickle
with open('pickle_file.pkl', 'rb') as file:
data = pickle.load(file)
print(data)
num_list = [range(1000000)]
# How to save a Python object to a pickle file
with open('new_pickle.pkl', 'wb') as file:
pickle.dump(num_list, file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment