Python check passwd
来源:互联网 发布:新店能开淘宝直播吗 编辑:程序博客网 时间:2024/05/22 19:16
代码:
passwdList=['initial']
valid = False
count = 3
while count > 0: #3 times input
input = raw_input("input passwd: ")
#check passwd
for eachpasswd in passwdList:
if input == eachpasswd:
valid = True
count = 0
print 'passwd OK!'
break
if not valid:
print "invalid input"
count -= 1
continue
else:
break
运行结果:
>>> ================================ RESTART ================================
>>>
q
input passwd:
invalid input
input passwd: qq
invalid input
input passwd: qq
invalid input
>>> ================================ RESTART ================================
>>>
input passwd: aa
invalid input
input passwd: aa
invalid input
input passwd: initial
passwd OK!
>>>
- Python check passwd
- Python - refector: passwd src
- passwd
- passwd
- passwd
- passwd
- python check syntax
- python check hosts update
- 【Python】Python语言check list
- Python - example: check prefix of string src
- Python note:For check type typechk.py
- 解决Python小问题:CRC check failed
- check
- CHECK
- struct passwd
- passwd文件
- PASSWD介绍
- struct passwd
- ubuntu 下 eclipse 中文输入
- off_t 问题
- matlab学习笔记(四)--- 图像的几何操作
- 程序员的方思
- setContentView( )方法
- Python check passwd
- JAX-WS Spring集成jax方式的webservice
- JAVA深度克隆
- iOS开发 - 控制在生命周期内只运行一次
- Android gdb 调试
- con
- Java中的两种多线程实现方式
- TexturePacker纹理打包打方法及技巧
- 判断当前app是不是default SMS app