Answers for "what is a pickle in python"

2

python pickle example

import pickle
favorite_color = { "lion": "yellow", "kitty": "red" }
with open( "save.p", "wb" ) as f:
	pickle.dump( favorite_color, f)
with open( "save.p", "rb" ) as f:
	favorite_color = pickle.load(f)
Posted by: Guest on September-21-2021

Code answers related to "what is a pickle in python"

Python Answers by Framework

Browse Popular Code Answers by Language