1. 文件的打开
with open(‘filename’ ,mode=’r’,buffering=1,…) as f:
f.read() f.write() f.readline() f.readlines() f.writelines() f.seek(offset,wheace=0) f.seek(50,1) 0表示开头,1表示当前位置,2表示结尾
https://docs.python.org/3/library/functions.html#open
posted on 2018-05-10 22:34 啊峰哥 阅读(160) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 啊峰哥 Powered by .NET 8.0 on Kubernetes