上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 48 下一页
摘要: #!/usr/bin/python#coding=gb2312x=99;def times(x,y): return x+y;def panduan(dke,dk2): if(dke>dk2): return dke; else: return dk2;def inserters(seq1,seq2): res=[]; for x in seq1: if x not in seq2: res.append(x); return res;def inserters2(seq1,seq2): ... 阅读全文
posted @ 2013-03-04 15:53 墨迹哥's 阅读(346) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python#coding=gb2312res=[];linx=[];f=open('/root/access.log.2');for line in f.readlines(): line.rstrip(); log_home=line.split(); ip=log_home[0]; date=log_home[3].replace('[',''); point=log_home[5].replace('"',''); path=log_home[6]; offer=log_ho 阅读全文
posted @ 2013-03-04 15:52 墨迹哥's 阅读(187) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python#coding=gb2312items=['aaa',111, (3.4) ,2.03];tests=[(3.4),112];for key in tests: if key in items: print "yes"; else: print "NO";res=[];for key in items: if key not in tests: res.append(key);print res; 阅读全文
posted @ 2013-03-04 15:51 墨迹哥's 阅读(328) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python#coding=gb2312 if not 1: print('trues');else: print('fuck');bk='skc'; if(bk=='skl'): print 'NOok';elif(bk=='skc'): print 'OK!';else: print 'fuck'; branch={'span':10,'jack':20,'black':30};print (b 阅读全文
posted @ 2013-03-04 15:50 墨迹哥's 阅读(217) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python#coding=gb2312 while True: raply=raw_input('Enter type:'); if raply == 'stop': print('bye'); break; elif not raply.isdigit(): if (raply.isalpha()): print(raply.upper()); else: num=int(raply); print(num **2); 阅读全文
posted @ 2013-03-04 15:49 墨迹哥's 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 48 下一页