I have to write a function that validates a password and returns true or false. It is only true if it is 8 characters, contains a number, a upper case letter, and a symbol.
This is what I have for my function file.
def validatepassword(pswd):
for char in pswd: if char in '01234567890': containsnumber = True
I have no idea how to incorporate the other variables, any help is appreciated.
Thanks
Aucun commentaire:
Enregistrer un commentaire