刚写了一个代吗,没有搞懂dump和dumps的区别,现在搞懂了,下班后在来整理
import pickle
q = [1,2,3,4]
pickle.dump(q,open("cb1.txt","wb"))
q2 = pickle.load(open('cb1.txt',"rb"))
print(q2)
刚写了一个代吗,没有搞懂dump和dumps的区别,现在搞懂了,下班后在来整理
import pickle
q = [1,2,3,4]
pickle.dump(q,open("cb1.txt","wb"))
q2 = pickle.load(open('cb1.txt',"rb"))
print(q2)