Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from re import compile, search
- upperRegex = compile(r'[A-Z]')
- lowerRegex = compile(r'[a-z]')
- digRegex = compile(r'\d')
- def strongPassword(text):
- if len(text) >= 8 and upperRegex.search(text) and lowerRegex.search(text) and digRegex.search(text):
- return True
- else:
- return False
- testPass = input()
- print(strongPassword(testPass))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement