python学习笔记--登录

#!/usr/bin/env python

num=1
while num < 4:
        num = num + 1
        user = raw_input("Please you name:")
        if user == "lf":
                password =raw_input("please pass:")
                p = "123456"
                while  password != p :
                        password =raw_input("please pass try again:")
                else:
                        print "Welcomea"
                        break
        else:
                print "Sorry ,user %s not found" %user

本文出自 “刘福” 博客,谢绝转载!

你可能感兴趣的:(python)