Python基礎知識(十)

Python基礎知識(十) 扁平文件、pickle、shelve、數據庫、ORM eval :將字符串轉化爲列表 scores=[99,88,77,55] def write_scores(): with open(‘data_list.txt’,‘w’,encoding=‘utf8’) as f: f.write(str(scores)) print(‘文件寫入完成…’) def read_sc
相關文章
相關標籤/搜索