标签:style lin nan opera start bee get line enc
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3
4 import getpass
5 name = "xilong"
6 password = "--------"
7 workid = 10008179
8
9 file = open("xilong.txt", "r+", encoding="utf-8")
10 count = 0
11 while count < 3:
12 _name = input("name:")
13 _mima = getpass.getpass("password:")
14 _workid = int(input("workid:"))
15 namelist = file.readlines()
16 print(namelist)
17 mingzi = _name + "\n"
18 if mingzi in namelist:
19 print("This account has been locked!")
20 break
21 if _name == name and _mima == password and _workid == workid:
22 print("Welcome to Visit StarTimes Operation&Maintenance Center!")
23 break
24 else:
25 print("Invalid Account, please try again!")
26 count += 1
27 if count == 3:
28 file.write("%s\n" %_name)
29 file.close()
#Becoming A Media Group with International Influence!
标签:style lin nan opera start bee get line enc
原文地址:https://www.cnblogs.com/xilong-devops/p/9434357.html