摘要: 需要使用fileinput这个标准库 官网链接:https://docs.python.org/zh-cn/3/library/fileinput.html 代码如下: #!/usr/bin/env python # coding: utf-8 """原地替换文件中的内容 使用标准库中的filein 阅读全文
posted @ 2022-10-26 15:16 Alan_LJP 阅读(402) 评论(0) 推荐(0)