python 实现敏感词屏蔽小程序

有一个文件,里面有一些敏感词汇,若是输入这些词,就用**代替,而后输出。 敏感词汇 dictionary.txt 文件内容: SB,傻B,傻逼,妈,日,shabi,操,sb,金三胖 代码实现主体:html f = open('dictionary.txt', 'r', encoding='utf-8') dic = f.read().split(',') string = input("请发言:\
相关文章
相关标签/搜索