May this is helpful for you.I use sum(1 for c in the string if c.islower()) to find the total number of lowercase. and same way to find the total number of uppercase and digit.len(string) to find length of string.
string=input()
if ((sum(1 for c in string if c.islower())>=1) and (sum(1 for c in string if
c.isupper())>=1) and (sum(1 for c in string if c.isdigit())>=1) and (len(string)>=7)):
print("Password is complex")
else:
print ("Password not complex enough")