python5 --- enter a user name and password to log unsuccessful three times, can not log in again

#!/usr/bin/env python
_user = "harry"
_password = "123456"
for i in range(3):
username = input("username:")
password = input("password:")
if _user == username and _password == password:
print("welcome %s login in" % _user)
break
else:
print("Invaild username or password ERROR")

Guess you like

Origin www.cnblogs.com/will--1213/p/11830700.html