文件名称:Python实现账号密码输错三次即锁定功能简单示例
文件大小:43KB
文件格式:PDF
更新时间:2024-01-21 11:00:10
continue python python函数
本文实例讲述了Python实现账号密码输错三次即锁定功能。分享给大家供大家参考,具体如下: 初学Python—1 #实现账号输错三次即锁定 user = hubery passwd = 123 confirm = 0 lock=0 fileOpen = open(username.txt,a+) fileOpen.seek(0) for i in range(3): username = input(username:) passsword = input(password:) for line in fileOpen.readlines(): if use