import pickle
d = dict(name='Bob', age=20, score=88)
print(d)
f = open('D:/untitled/1022/dump.txt', 'wb')
#对象写入文件
pickle.dump(d,f)
f.close()
#文件读取
g = open('D:/untitled/1022/dump.txt', 'rb')
e=pickle.load(g)
print(e)
import pickle
d = dict(name='Bob', age=20, score=88)
print(d)
f = open('D:/untitled/1022/dump.txt', 'wb')
#对象写入文件
pickle.dump(d,f)
f.close()
#文件读取
g = open('D:/untitled/1022/dump.txt', 'rb')
e=pickle.load(g)
print(e)