+ 1

Password Validation Code (100xp problem on sololearn)

s=input() l=['!', '@', '#', '

#x27;, '%', '&', '*'] e=0 p=0 for i in s: if i in l: e+=1 if i.isdigit()==True: p+=1 if e>=2 and len(s)>=7 and p>=2: print("Strong") else: print("Weak")

22nd Jan 2022, 3:05 AM
Harsh Bhardwaj
1 Antwort
0
"if i.isdigit():" - enough, "==True" don't need. you write: "True==True".
27th Jan 2022, 3:37 PM
Andrey Dugin