📜  如何在python代码示例中存储数据

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

代码示例2
import pickle

variable = "Hi"

#Save the variable
pickle.dump(variable, open("variableStoringFile.dat", "wb"))
            
#Load the variable
variable = pickle.load(open("variableStoringFile.dat", "rb"))