更新
This commit is contained in:
12
Python-100-Days/Day01-15/Day12/test5.py
Normal file
12
Python-100-Days/Day01-15/Day12/test5.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import re
|
||||
|
||||
|
||||
def main():
|
||||
sentence = '你丫是傻叉吗? 我操你大爷的. Fuck you.'
|
||||
purified = re.sub('[操肏艹草曹]|fuck|shit|傻[比屄逼叉缺吊屌]|煞笔',
|
||||
'*', sentence, flags=re.IGNORECASE)
|
||||
print(purified)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user