Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import argv
- script, banned_word, phrase = argv
- banned_word = banned_word.lower()
- old_banned_word = banned_word
- phrase = phrase.lower()
- split_phrases = phrase.split()
- for thing in split_phrases:
- print "Banned word: %s" % banned_word
- if not banned_word.startswith(thing):
- banned_word = old_banned_word
- continue
- else:
- if len(banned_word) == len(thing):
- print "Success"
- break
- else:
- banned_word = banned_word[len(thing):]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement