hi everybody,<br>i have a file with data separated by tab <br>mydata:<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>hob1    wsp1<br>hob1    rad3<br>cdr2    cdc13 <br>cdr2    cdc2<br>shows these two are separated by tab represented as columns<br>i have to check the common data between these two coloumn1 an coloumn2<br>my code:<br>data = []
<br>data1 = []<br>result = []<br>fh = open('sheet1','r')<br>for line in fh.readlines():<br>        splitted = line.strip().split('\t')<br>        data.append(splitted[0])<br>        data1.append(splitted[1])
<br>        for k in data:<br>                if k in data1:<br>                        result.append(k)<br>                        print result<br>fh.close()<br><br>can you tell me problem with my script and what should is do for this
<br><br>regards<br>shafreen<br>