用户登录(三次机会重试)
count=0 while count<3: user=input('>>>') pwd=input('>>>') if user=='alex' and pwd=='123': print('欢迎登录') break else: print('用户名或者密码错误') count+=1
用户登录(三次机会重试)
count=0 while count<3: user=input('>>>') pwd=input('>>>') if user=='alex' and pwd=='123': print('欢迎登录') break else: print('用户名或者密码错误') count+=1
转载于:https://www.cnblogs.com/liushuizs/p/10224257.html