Skip to content

Commit 73cf3c4

Browse files
committed
py file done
1 parent 44baae0 commit 73cf3c4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from better_profanity import profanity
2+
3+
def detect(data):
4+
try:
5+
'''profanity.censor(data) will print **** '''
6+
'''profanity.censor(data,'#') will print #### if censor word it detected; else it will print data you have entered '''
7+
output=profanity.censor(data,'#')
8+
print(output)
9+
except Exception as e:
10+
print(e)
11+
12+
profanity.load_censor_words()
13+
data = input("enter your msg:")
14+
detect(data)

0 commit comments

Comments
 (0)