敏感词过滤

words = ("垃圾","陷阱","不要脸","内幕","辣鸡")
text = input()
for word in words:
    if word in text:
        text = text.replace(word, "*")
print(text)

 

posted @ 2020-04-14 22:26  林晓婷  阅读(218)  评论(0)    收藏  举报