📜  pickle.dump python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.684000             🧑  作者: Mango

代码示例4
1 # Save a dictionary into a pickle file.
   2 import pickle
   3 
   4 favorite_color = { "lion": "yellow", "kitty": "red" }
   5 
   6 pickle.dump( favorite_color, open( "save.p", "wb" ) )