0
What is wrong with this code (Password validation from code coach)
import re user=input("") length=7 pattern = r"[A-Z][A-Z][0-9]['!','@','#','
#x27;,'%','&','*']" #spl_char=['!','@','#','#x27;,'%','&','*'] check=re.search(pattern,user) def Password_validate(user): if check and length>=7: return "Strong" else: return "Week" print(Password_validate(user))4 Antworten
+ 2
Even if you do not know all the nuances of creating a template, you can still write code, just use several instead of one template. ☺️
+ 1
You wrote pattern so that the first two characters must always be in uppercase, 3rd digit, 4th one of the specified characters.
+ 1
You do not understand, you have a fixed pattern with an unchanging sequence of characters.
0
I fixed it and still this code is not working
from[A-Z][A-Z] to [A-Z][a-z]