如何读取和写入文件

如何读取和写入文件

问题描述:

从文件中读取并写入其他文件。关于如何初始化读写函数的任何指南?

Reading from a file and writing to a different file. Any guide on how to initialise the read and write functions?

如何初始化r和w命令?
How do i initialise the r and w command?


我开始在这里阅读:
http://docs.python .org / 2 / tutorial / inputoutput.html


并提出:
i started reading here:
http://docs.python.org/2/tutorial/inputoutput.html


and came up with:
展开 | 选择 | Wrap | 行号


但略胜一筹:
but slightly better:
展开 | 选择 | 换行 | 行号