def clues_login(text):
 text = text.lower()
 for clue in ('username', 'password', 'invalid', 'authen', 'access denied'):
  if (clue in text):
   return True
 return False

def clues_login ( text ) : text = text . lower ( ) for clue in ( 'username' , 'password' , 'invalid' , 'authen' , 'access denied' ) : if ( clue in text ) : return True return False
check for any "failed login" clues in the response code .