12 2013 档案
摘要:import ref = open("beijing1.txt", "r")t = open("beijing2.txt", "w") while True: line = f.readline() if line: if 'np' in line and 'offline' in line : m=re.split("[|]",line) r1=r".*\?IMSI=(\d+)&MOBILE=&VERSION=(.*)&CHAN
阅读全文
摘要:import ref = open("1205.txt", "r") m = open("1206.txt","w") while True: line = f.readline() if line: x=re.split("[|]",line) r1=r"\w+_(renow.+Alpha).*\?IMSI=(\d+)&MOBILE=&OLD_VERSION=(.*)&CHANNELID=(.*)" s=re.search(r1,x[2]) if s
阅读全文
摘要:str = "0123456"if str.find("8")!=-1 or str.find("3")!=-1: print "YES!"else: print "NO!"会输出"YES!"
阅读全文
摘要:f = open("1.txt", "r") while True: line = f.readline() if line: else: break f.close()
阅读全文
摘要:import cx_Oraclemap1={}map2={}con= cx_Oracle.connect("admin/admin@ssx")cursor=con.cursor()cursor.execute('select * from test1')rows = cursor.fetchall()print rowsfor x,y,z,m in rows : print x print y print z print m map1[x]=y key=','.join([str(x),str(y),str(z),str(m)]) map2[
阅读全文