+ 1
Ideas for writing a password checker in python
prompt user for password and check if it means criteria like character size 6-12 , has one element of 0-9
2 odpowiedzi
+ 4
import string
password = input("Password: ")
if not 6 <= len(password) <= 12:
print("Password does not have length of 6-12.")
if not any(digit in password for digit in string.digits):
print("Password does not have numbers 0-9.")
0
With regular expression to check for digit:
https://code.sololearn.com/c6696bbySiPn/?ref=app