'''
pikcle的作用是編碼和解碼
pikcle的四種方法:
dump 對文件中的內容進行編碼的方式操作
load 對文件中的內容進行解碼操作yh67
dumps 將內容編碼成二進制的方式
loads 將內容從二進制上進行解碼
'''
#先進行調用pikcle模塊
# import pickle
# list1=[1,2,3,4]
# res=pickle.dumps(list1) #:將列表內容轉換成二進制
# print(res)
# res1=pickle.loads(res)
# print(res1)
#使用pikcle對文件進行寫讀操作(二進制)
#注意必須要使用二進制的方式進行操作
# import pickle
# with open("yangceshi1.txt","wb") as file1:
# pickle.dump("天上天下,人來人往",file1)
# with open("yangceshi1.txt","rb") as file1:
# res=pickle.load(file1)
# print(res)