You are viewing a single comment's thread. Return to all comments →
Python solution using Hash Map:
special_characters = "!@#$%^&*()-+" hash_map={"num":0, "low":0, "up":0,"spcl": 0} for letter in password: if letter.islower(): hash_map["low"]+=1 if letter.isupper(): hash_map["up"]+=1 if letter.isdigit(): hash_map["num"]+=1 if letter in special_characters: hash_map["spcl"]+=1 # print(hash_map) count=0 for val in hash_map.values(): if val == 0: count+=1 if n+count<6: rem_dig=6-(n+count) count+=rem_dig return count
Seems like cookies are disabled on this browser, please enable them to open this website
Strong Password
You are viewing a single comment's thread. Return to all comments →
Python solution using Hash Map: