阅读背景:

在Python中搜索和替换文件中的一行。

来源:互联网 

I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then write it back, but that probably is not the best way to do it.I want to loop over the contents of a text file




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: