Detect Spam Comments Using Python
A spam Comment Define As Text Conating Following Keywords "make a lot of money","buynow", "Subscribe this", "click this" write A program to detect spam is Using Python Program
Code:
comment = input("Enter the comment : ")
if ("make a lot of money"in comment) :
spam = True
elif ("buy now" in comment) :
spam = True
elif ("subscribe this" in comment) :
spam = True
elif ("click this" in comment) :
spam = True
else :
spam = False
if (spam) :
print("This Is a Spam Comment")
else :
print("This is not a Spam Comment")
Output:
Enter the comment : buy now
This Is a Spam Comment
Comments
Post a Comment