python 5.0 file manipulation python 5. 文件操作 5.1 打开关闭 打开 a = open("1.txt","w") 如果不存在,w模式会帮你直接新建一个 关闭 a.close() 打开文件只用于写入 w 二进制格式只读 rb(默认) 只读 r 追加 a