首页 > 编程语言 > 详细

python脚本二

时间:2015-07-02 01:14:12      阅读:123      评论:0      收藏:0      [点我收藏+]
#!/usr/bin/python

a = "a.txt"

f = file(a)

c = f.readlines()

while True:
        user_input = raw_input("plz input your name:").strip()
        if len(user_input) == 0:continue
        for line in c:
                if user_input in line:
                        print line,
                        break
        else:
                print "it is not the user"


python脚本二

原文:http://44994.blog.51cto.com/34994/1669884

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!