python:替换文本文件中指定的文本字符串 def text_file_replace(file, encoding, old, new): lines = [] cnt = 0 with open(