+ 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

15th Sep 2018, 6:36 PM
Jose Muriithii
Jose Muriithii - avatar
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.")
15th Sep 2018, 8:34 PM
Eduardo Petry
Eduardo Petry - avatar
0
With regular expression to check for digit: https://code.sololearn.com/c6696bbySiPn/?ref=app
16th Sep 2018, 10:00 AM
benjamin