Python零基礎學習筆記(三十二)——list/tuple/dict/set檔案操作
vimport pickle #資料永續性模組
Mylist = [1, 2, 3, 44, "aaa", True]
path = r"C:UsersAdministratorPycharmProjectsuntitledday011檔案讀寫file2.txt"
f = open(path, "wb")
pickle.dump(Mylist, f)
f.close()
#讀取
f1 = open(path, "rb")
tempList = pickle.load(f1)
print(tempList)
f1.close()
相關文章
- Python3學習筆記2,基本資料型別-list、tuple、set、dictPython筆記資料型別
- Python 的List 和tuple,Dict,SetPython
- Python零基礎學習筆記(二十)——tuple元組Python筆記
- python中的list,tuple,set和dict(參考python文件)Python
- Python零基礎學習筆記(二十一)——dict字典Python筆記
- Python零基礎學習筆記(十五)——list(列表)Python筆記
- Python零基礎學習筆記(三十)——讀檔案Python筆記
- Python零基礎學習筆記(二十二)——setPython筆記
- Python之list,string,tuple,dict練習題Python
- Python學習筆記|Python之檔案操作Python筆記
- Python基礎:dict & setPython
- 006零基礎學Python:Python 檔案I/O和File方法--學習筆記Python筆記
- 零基礎學習 Python 之檔案Python
- Python中基礎資料型別(List、Tuple、Dict)的概念和用法Python資料型別
- python學習筆記:第8天 檔案操作Python筆記
- Python中tuple和list的區別?Python基礎學習!Python
- Python基礎:使用list & tuplePython
- Python零基礎學習筆記(九)——隨機數Python筆記隨機
- Java筆記——【List、Set】Java筆記
- Python中的基礎資料型別(List,Tuple,Dict)及其常用用法簡析Python資料型別
- python學習筆記-list的用法Python筆記
- Python零基礎學習筆記(三十五)——記憶體修改Python筆記記憶體
- 草根學Python(四) Dict 和 SetPython
- Python零基礎學習筆記(四十)——datetime和CalendarPython筆記
- Python零基礎學習筆記(二十三)——迭代器Python筆記
- Python零基礎學習筆記(二十四)——函式Python筆記函式
- python學習筆記24_集合set( )Python筆記
- 草根學Python(三)List 和 TuplePython
- Python學習筆記|Python之特殊檔案Python筆記
- python file 檔案操作筆記Python筆記
- python基礎之字典dict和集合setPython
- python dict{}和set([])Python
- Python零基礎學習筆記(二)——資料的儲存Python筆記
- Python零基礎學習筆記(二十五)——裝飾器Python筆記
- python基礎之列表list元組tuplePython
- Python學習筆記:列表(list)基本內容Python筆記
- Python List 基礎學習Python
- Swift學習筆記(三十二)——可變引數Swift筆記