count = 0
while count < 3:
user = input('>>>')
pwd = input('>>>')
if user == 'wy' and pwd == '123':
print "欢迎登陆"
break
else:
print "用户名或者密码错误"
count = count +1
count = 0
while count < 3:
user = input('>>>')
pwd = input('>>>')
if user == 'wy' and pwd == '123':
print "欢迎登陆"
break
else:
print "用户名或者密码错误"
count = count +1
转载于:https://www.cnblogs.com/wangyue0925/p/8926972.html