如何用python把一个txt文件中所有逗号

如题所述

读取open文件。然后read读取内容。用replace替换内容。write写回文件
new__string = old__string.replace(' ', '_')
温馨提示:答案为网友推荐,仅供参考
相似回答