python实现用户登录功能模块

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,用户登录)