username = '987654321' password = '123456789' count = 0 while count < 3: c = input('请输入账号:') d = input('请输入密码:') if c == username and d == password: print('登陆成功') else: print('登录失败') count += 1
username = '987654321' password = '123456789' count = 0 while count < 3: c = input('请输入账号:') d = input('请输入密码:') if c == username and d == password: print('登陆成功') else: print('登录失败') count += 1
转载于:https://www.cnblogs.com/JJJay/p/10429428.html