Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Stright forward solution in Clear category for House Password by Butch
def checkio(data):
"""
Check strength of password
Input: string [a-zA-Z0-9]+
Output: True or False
The password will be considered strong enough if its length is
greater than or equal to 10 symbols, it has at least one digit,
as well as containing one uppercase letter and one lowercase letter in it.
"""
if len(data) < 10:
return False
has_digit = False
has_lower = False
has_upper = False
for char in data:
if char.isdigit():
has_digit = True
if char.islower():
has_lower = True
if char.isupper():
has_upper = True
return has_digit and has_lower and has_upper
June 20, 2015
Comments: