Python实现三次密码登陆

username='wzt01'
password='abc123'
count=0
while count<3:
             count+=1
                    access_name=input('请输入账号:')
                    access_pass=input('请输入密码:')
            if access_name=='wzt01' and access_pass=='abc123':
                    print('账号密码正确')
                    break
           elif count==3:
                    print('login failed')
            else: print('账号密码错误,请重新输入:\n')

网页标题:Python实现三次密码登陆
新闻来源:http://azwzsj.com/article/ggegeh.html