- 博客(1)
- 收藏
- 关注
原创 python完成“疯狂填词”程序。
看了些大家写的程序,感觉不是特别完美,自己尝试修改了一下。我的代码如下:import refilename = 'mode_file.txt'nwqfilename = 'replaced_file.txt'#获取文本信息。with open(filename) as f: content = f.read()f.close()#找到全部需要替换的字符串。txtRegex = re.compile(r'[A-Z]+[A-Z]+')spam = txtRege
2023-02-10 08:52:12 116
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人