hi everbody,<br>i have a file with data:<br>fhl1    fkh2<br>dfp1    chk1<br>mal3    alp14<br>mal3    moe1<br>mal3    spi1<br>mal3    bub1<br>mal3    bub3<br>mal3    mph1<br>mal3    mad3<br>hob1    nak1<br>i have  written code to check the redudant pairs 
<br>my code:<br>data = []<br>data1 = []<br>fh = open('sheet1','r')<br>for line in fh:<br>        if line not in data:<br>                data.append(line)<br>        else:<br>                print line<br>
                                                                                                                 <br>fh.close()<br>fh1 = open('sheet2','r')<br>for line1 in fh1:<br>        if line1 not in data1:
<br>                data1.append(line1)<br>        else:<br>                print line1<br>fh1.close()<br><br><br>result:<br>klp5    bub1<br> <br>apn1    apn2<br><br>but i have do the same for the revere ,to check the result like this for    
<br>eg:<br>apn2    apn1<br>what is the concept to do this<br><br>regards<br>shafreen<br><br><br>