+ 1
[HELP] 12 cases passed. what's the wrong of the code?
my code here : import re ptr='^(?=.*\W{2,})(?=.*\d{2,}).{7,}
#x27; st=input() #print(re.findall(ptr,st)) if re.findall(ptr,st): print("Strong") else: print("Weak")1 Odpowiedź
+ 1
Your code will only work if either the numbers or characters are bonded and uninterrupted like "98" or "@%" will work,, but "9@8%" won't (the two numbers are now interrupted), so try to find an approach to check for the occurence even if they are scattered randomly, you might need a for loop to check the whole array.