<br>Hi<br><br>pls redefine ur problem.<br>I donot understand what u wanted to accomplish .<br>is it that u wanted to check and represent the redundant entry numbers as one entry or is it<br> with the isoform id as a single entry and without considering other data like start  and stop ? 
<br><br>also observe that when u consider the whole line in the data file, they are all unique - there is no redundancy.<br><br>KM<br>-----------------------------------------------------------<br><div><span class="gmail_quote">
On 8/2/07, <b class="gmail_sendername">Beema shafreen</b> <<a href="mailto:beema.shafreen@gmail.com">beema.shafreen@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everybody ,<br>      I am a beginner in python,<br>         I have to fetch the redundant entries from a file,<br>                         <br>code:<br><br>import re<br>L = []<br>fh = open('ARCHITECTURE_MAIN.txt',
<div>'r')
<br>for line in fh.readlines():<br>        data =line.strip()<br>#       splitted = data.split('#')<br>        L.append(data)<br>fh.close()<br>                                                                                                                      
<br>M=L<br>for x in L:<br>        x = x.split('#')<br>        for y in M:<br>            y = y.split('#')<br>        x_data = x[0],x[1],x[2],x[3]<br>        #print x_data<br>        y_data = y[0],y[1],y[2],y[3]
<br>        #print y_dat<br>        if x_data[0] == y_data[0]:<br>              print x_data<br><br><br>i get the result as a tupule,<br>the text file which has datas separated by hash<br>entry#isoform#start#stop#  i have to check upto this
<br><br>00250_1#ARCH_104#61#89#Literature#9224948#00250####<br>00250_1#ARCH_104#97#126#Literature#9224948#00250####<br>00250_1#ARCH_104#139#186#Literature#9224948#00250####<br>00251_1#ARCH_463#7#59#SMART##00251####<br>00251_1#ARCH_463#91#121#SMART##00251####
<br>00251_1#ARCH_463#251#414#SMART##00251####<br>00251_1#ARCH_463#540#624#SMART##00251####<br>00252_1#ARCH_474#1#21#Literature#8136357#00252####<br>00252_1#ARCH_393#481#501#Literature#8136357#00252####<br>00252_1#ARCH_463#523#553#SMART##00252####
<br>00253_1#ARCH_82#37#362#SMART##00253####<br>00253_1#ARCH_54#365#522#SMART##00253####<br>00253_1#ARCH_104#589#617#SMART##00253####<br>00253_1#ARCH_104#619#647#SMART##00253####<br>00253_1#ARCH_104#684#712#SMART##00253####
<br>00254_1#ARCH_82#27#352#SMART##00254####<br>00254_1#ARCH_54#355#510#SMART##00254####<br>00254_1#ARCH_104#576#604#SMART##00254####<br>00254_1#ARCH_104#606#634#SMART##00254####<br>00254_1#ARCH_104#671#699#SMART##00254####
<br>00255_1#ARCH_82#56#425#SMART##00255####<br>00255_1#ARCH_54#428#582#SMART##00255####<br>00255_1#ARCH_104#696#724#SMART##00255####<br><br><br><br><br>can you suggest me ,what are the improvement i have to make in the above code
<br>regards<br><span>shafreen</span></div>
<br>--<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div>
<br>