Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for House Password by Phil15
def checkio(password):
if len(password) >= 10:
tests = [False] * 3 # has_digit, has_upper, has_lower
for ch in password:
if ch.isdigit():
tests[0] = True
elif not ch.isalpha():
raise ValueError(f'{ch!r} is no digit or ascii letter.')
elif ch.isupper():
tests[1] = True
else:
tests[2] = True
if all(tests):
return True
return False
Feb. 28, 2020
Comments: