Created
September 27, 2017 11:17
-
-
Save hisui/4866f5843eb2fd55a97371a0dd4a355f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# Strong Password Detection | |
def is_strong_password(src): | |
return all(re.compile(e).search(src) for e in [ | |
r'.{8}', | |
r'[a-z]', | |
r'[A-Z]', | |
r'[0-9]' | |
]) | |
# Regex Version of strip() | |
def my_strip(src): | |
return re.compile(r'^\s*(.*?)\s*$').sub(r'\1', src) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment