Python password validation driving me crazy! help plz!
hi, I am trying to output password strength using python. But the code just doesn't want to work properly, so, are there any Python guru to solve the issue am having? Here is what i want to do; output a password must be more than 6 characters and less than 10 characters. The password has to be mix of letters and numbers. Here is my code: password = input("Enter password ") max_pass_length = 10 min_pass_length = 6 pass_len = len(password) while pass_len == max_pass_length or pass_len == min_pass_length: if pass_len > max_pass_length or pass_len < min_pass_length: password = input("enter password again ") else: if password.isnumeric(): msg = "error password only numbers" elif password.isalpha(): msg = "error password only letters" else: msg = "password strong!" print(msg) So, do you any of you know what i am doing wrong in here? cheers