import pickle #数据持久性模块myList = [1,2,3,4,5,'sunck is a good man']path = r'D:juhexieyinewdata3.txt'f = open(path,'wb')pickle.dump(myList,f)f.close()#读取f1 = open(path,'rb')tempList = pickle.load(f1)print(tempList)f1.close()