valid = Falsecount = 3passwdList = [1]while count > 0: input = raw_input("enter password") for eachPasswd in passwdList: if input == eachPasswd: valid = True break if not valid: # (or valid == 0) print "invalid input" count -= 1 continue else: break
Name (required)
email (will not be published) (required)
Website