import pickle
Open the file in binary write mode and save the object
with open("pickle_filename.pickle", 'wb') as file:
pickle.dump(my_list, file)
with open("pickle_filename.pickle", 'rb') as file:
loaded_object = pickle.load(file)
import pickle
with open("pickle_filename.pickle", 'wb') as file:
pickle.dump(my_list, file)
with open("pickle_filename.pickle", 'rb') as file:
loaded_object = pickle.load(file)