vimport pickle #数据持久性模块
Mylist = [1, 2, 3, 44, "aaa", True]
path = r"C:\Users\Administrator\PycharmProjects\untitled\day011\文件读写\file2.txt"
f = open(path, "wb")
pickle.dump(Mylist, f)
f.close()
#读取
f1 = open(path, "rb")
tempList = pickle.load(f1)
print(tempList)
f1.close()