python使用正则表达式验证用户输入密码的有效性
条件:
1,最少有8位
2,字母范围a到z
3,至少有一个字母时大写的
4,至少有一个数字
5,至少有一个特殊字符(_、@、$)
#密码验证的条件
# Python program to check validation of password# Module of regular expression is used with search()import repassword = "R@m@_f0rtu9e$"flag = 0while True:if (len(password)<8):flag = -1bre