隐藏敏感词

1 l2 = []
2 li = ['顾清秋','懒笨呆']
3 content = input('请输入内容')
4 for i in li:
5     if i in content:
6         content = content.replace(i,'*'* len(i))
7 l2.append(content)
8 print(l2)
View Code

 

posted @ 2018-03-22 17:31  Qingqiu_Gu  阅读(102)  评论(0编辑  收藏  举报