标签:import 退出 bre pre imp port print 错误 color
import getpass i = 3 while i > 0: x = input (‘请输入用户名:‘) y = getpass.getpass(‘请输入密码:‘) if x == ‘123‘ and y == ‘456‘: print(‘登陆成功‘) break else: print(‘请重新输入‘) i -= 1 if i == 0: print(‘错误次数超过3次‘)
标签:import 退出 bre pre imp port print 错误 color
原文地址:http://www.cnblogs.com/wkdadelosi/p/7266270.html