def login():
# 登录
# 登录 输入用户名密码
# 和self.user_list作比对
while True:
username = input('用户名 :')
# password = input('密 码 :')
# user_list=SC.getallstudents()
user_list=["a","b","c","d"]
for user in user_list:
if username == user:
print('登录成功')
return user # 退出 for in及 while循环
else:
print('登录失败')
print(login())