How do you use: isalnum, isdigit, isupper to test each character of a string? [closed]
I am trying to make a password strength simulator which asks the user for a password and then gives back a score. I am using: islanum() isdigit() isupper() to try and see how good the inputted password is. Instead of returning boolean values, I want this to assess each characters of the password, and then the program to add up all the "True" values and turn it into a score. EXAMPLE CODE: def upper_case(): points = int(0) limit = 3 for each in pword: if each.isupper(): points = points + 1 return points else: return 0 Any help would be much appreciated!! THANKS!! .isalnum() , .isupper() ,