模式 | r | r+ | w | w+ | a | a+ |
读 | √ | √ | √ | √ | ||
写 | √ | √ | √ | √ | √ | |
创建 | √ | √ | √ | √ | ||
覆盖 | √ | √ | ||||
指针在开始 | √ | √ | √ | √ | ||
指针在结尾 | √ | √ |
参考文档:
Python 文件I/O | 菜鸟教程 https://www.runoob.com/python/python-files-io.html
来源:https://www.cnblogs.com/Raine/p/10198498.html