Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Acceptable Password V by Pouf
def is_acceptable_password(password: str) -> bool:
password_length = len(password)
is_long_enough = password_length > 6
is_very_long = password_length > 9
has_at_least_one_digit = any(c.isdigit() for c in password)
only_digits = password.isdigit()
does_not_contain_password = "password" not in password.casefold()
return (is_long_enough
and does_not_contain_password
and (is_very_long
or (has_at_least_one_digit
and not only_digits)))
June 28, 2020