Oct-10-2016, 06:51 PM
I believe this captures your idea as far as I understand it:
password = input("Enter password: ") min_size = 6 strength = ["Too short", "Weak", "Medium", "Strong"] security = 0 if len(password) >= min_size: if any(char.isdigit() for char in password): security += 1 if any(char.isupper() for char in password): security += 1 if any(char.islower() for char in password): security += 1 print(strength[security])Seem correct?