1 # -*- coding:utf-8 -*- 2 __author__ = 'admin' 3 ''' 4 locked.txt: 5 liuxiaoyu 6 xiaodong 7 tenglan 8 match.txt: 9 alex 123456 10 xiaoyu 6543210 11 wulongyuan 6667770 12 ''' 13 import sys 14 15 account_file = 'c:python作业day1match.txt' 16 locked_file = 'c:python作业day1locked.txt' 17 18 def deny_account(user_name): 19 print('您的用户 %s 已被锁定!' % user_name) 20 with open(locked_file, 'a') as deny_f: 21 deny_f.write(' ' + user_name) 22 23 def main(): 24 retry_count = 0 25 retry_limit = 3 26 while retry_count < retry_limit: 27 user_name = input('