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

更新时间:2023-05-14 01:42:21 阅读: 评论:0

写⼀个密码校验程序,密码格式为含有⼤写、⼩写字母、数
字,长度为8位发财树种植
def get_passwords():
password = input('请输⼊⼀个密码:'.strip())
纯碎
list_lower = []
list_upper = []
list_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('不做任何操作!')
大耳朵图图第六季if len(list_upper) > 0 and len(list_lower) > 0 and len(list_digit) > 0:
print('输⼊的密码ok!')
el:
print('输⼊的密码不符合要求,密码必须包含⼤写、⼩写、数字的组合')
el:
津娃print('输⼊的密码长度不是8位,请重新输⼊!')
elif len(password) == 0:
print('密码不能为空!')
el:
print('此种情况不存在!')
get_passwords()

本文发布于:2023-05-14 01:42:21,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/895126.html

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

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