python 做一个简单的登录接口
# -*- conding :utf-8 -*-
# File Name: homewoe
# Create Date: 2019/11/20 / 9:15
# Change Activity: 2019/11/20:
# Email:18523607242@163.com
# Author: 袁晓松
_username="18523607242@163.com" _password="yuan195866,." i=0 while i<=3: username=input("username:") password=input("password:") if username==_username and password==_password: print("Welcome to my world {user}".format(user=username)) break else: print("账号或者密码输入错误,请重新输入") i+=1 else: print("账号或者密码输入错误次数过多,已锁定")