Skip to content
← Back to Community
how to Password reset program
Profile icon
NoahRahmanBonni

Password reset program
Only accept a new password if it is:

  1. At least eight characters long
  2. Has lower case and upper case letters.
  3. Contains a number
Voters
Profile icon
NoahRahmanBonni
Comments
hotnewtop
Profile icon
Coder100
password='coder100s_strong_passworD' print(len(password) > 8 and password.lower() != password and any(chr.isdigit() for chr in password))

E

ok basically its a and condition.
The first one checks the length
the second checks if it is different cased, because a Capital will never equal a capital.
The third checks if there was a number.