Python 文件内容修改替换操作
Python 文件内容修改替换操作1234567891011import iodef alter_file(file,old_str,new_str): file_data = "" with io.open(file, "r", encoding="utf-8") as f: for line in f:
Python 文件内容修改替换操作1234567891011import iodef alter_file(file,old_str,new_str): file_data = "" with io.open(file, "r", encoding="utf-8") as f: for line in f: