写一个密码校验程序,密码格式为含有大写、小写字母、数字,长度为8位

更新时间:2023-05-18 13:54:30 阅读: 评论:0

写⼀个密码校验程序,密码格式为含有⼤写、⼩写字母、数
字,长度为8位
wsasdef get_passwords():
password = input('请输⼊⼀个密码:'.strip())
list_lower = []
菠萝的英文list_upper = []ladies
ifxlist_digit = []
if len(password) > 0:
if len(password) == 8:
for k in password:
if k.isdigit():
list_digit.append(k)
elif k.islower():
list_lower.append(k)
elif k.isupper():
list_upper.append(k)
el:
print('不做任何操作!')
titleistif len(list_upper) > 0 and len(list_lower) > 0 and len(list_digit) > 0:
print('输⼊的密码ok!')
cinch
el:
grimmprint('输⼊的密码不符合要求,密码必须包含⼤写、⼩写、数字的组合')
world sing how learn
el:
print('输⼊的密码长度不是8位,请重新输⼊!')
elif len(password) == 0:
print('密码不能为空!')
el:
print('此种情况不存在!')
枫杨外国语get_passwords()gatherer

本文发布于:2023-05-18 13:54:30,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/682138.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:密码   组合   情况
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图