0
Could anyone tell what is the wrong with this code
This code is for the password validator challenge there is one problem that i don't know https://code.sololearn.com/cqjOp13m6SFd/?ref=app
4 odpowiedzi
+ 5
it working fing
+ 2
Share what error you getting @Loay Ahmed Elgendy? Just tried to run your code, it seems to work fine. Gives valid output if password is "strong" or "weak"
+ 1
import re
pswd = input()
special = re.sub ("[!@#$%&*]", "", pswd)
nums = re.sub ("[\d]", "", pswd)
if len(pswd) < 7 or len(special) == len(pswd) or len(nums) == len(pswd):
print ("Weak")
else :
print ("Strong")
This is the answer i found it on Google
0
It's a challenge and There is one problem and the error is in hidden test
The challenge need minimum 2 numbers, 2 of the following special characters and a length of at least 7 characters