Thursday, December 17, 2015

Python :: Spammed word Validator or Blocked Spammed Word

Python :: Spammed word Validator or Blocked Spammed Word :-

def is_spammed(content):
    content = " "+content.lower()+" "
    spamword_list = ['call girls','Escort Service','sex','spam']
    for x in spamword_list:
        if " "+x+" " in content:
            return True
    return False

is_spammed("this is spam word") // return True

No comments: