2021年1月27日

Python 文件操作

摘要: 参考来源:Magnus Lie Hetland 《Python基础教程》 1. open f = open('somefile.txt') # 文件名是唯一必不可少的参数,返还一个文件对象 2. 文件模式 类似于c++,open的参数mode(默认是 r 模式,即只读) 'r' 'w' 'x' 独占 阅读全文

posted @ 2021-01-27 23:04 luyi07 阅读(128) 评论(0) 推荐(0) 编辑

导航