#!/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
本文出自 “刘福” 博客,谢绝转载!