Advertisement
Protocol_

Word filter

Oct 14th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. strIn = input("Type : ")
  2. arrBad = ['shit', 'ass', 'cunt', 'fuck', 'nigger', 'bitch']
  3. divide = strIn.split(' ')
  4. lenStr = len(divide)
  5. s = 0
  6. while s != lenStr:    
  7.     arrUsrIn = divide[s]
  8.     s += 1
  9. if arrUsrIn in arrBad:
  10.     print("Bad word detected\n")
  11. else:
  12.     pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement