Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def passwordChecker():
- while True:
- password = raw_input("Input password: ")
- if len(password) > 7 and len(password) < 33:
- if any(char.isupper() for char in password) and any(char.islower() for char in password) and any(char.isdigit() for char in password):
- print "Strong password!"
- break
- else:
- print "Weak password!"
- else:
- if len(password) < 8:
- print "Password should be at least 8 characters long."
- elif len(password) > 32:
- print "Password should be less than 33 characters long."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement