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
相关文章
相关标签/搜索