python实现登录功能模块

#!/usr/bin/env python
while True:
user = raw_input('Please input username:')
if user == ('Kate'):
password = raw_input('Please input password:')
while True:
if password != ('123'):
print "Wrong password,please try again!"
password = raw_input('Please input password:'                                                                                        )
if password == ('123'):
print "Hello %s,welcome to the system!"                                                                                         % user
break
break
else:
print "The username %s has not been found!" % user

 python实现用户登录功能模块_第1张图片