From: from http://blog.csdn.net/yatere/article/details/6628304

#conding utf-8  
import re,fileinput  
f=fileinput.input()  
a=''  
for i in f:  
    a=a+i  


myre=re.compile(r'(\S+)\s+(\S+).*')  
myr=myre.findall(a)  


a=[]  
for i,l in myr:  
    k=re.findall(r'\d+\.\d+\.',i)  
    a.append(k)  

del myr,myre,f,k,i,l  
b=[]  
for i in a:  
    i=i[0]+'0.0'  
    b.append((i,i[:-3]+'255.255'))  
del a  
b=list(set(b))  

for i,l in b:  
    print i,' '+l

发表评论

电子邮件地址不会被公开。 必填项已用*标注