hi everybody, i have a file with data separated by tab mydata: fhl1 fkh2 dfp1 chk1 mal3 alp14 mal3 moe1 mal3 spi1 mal3 bub1 mal3 bub3 mal3 mph1 mal3 mad3 hob1 nak1 hob1 wsp1 hob1 rad3 cdr2 cdc13 cdr2 cdc2 shows these two are separated by tab represented as columns i have to check the common data between these two coloumn1 an coloumn2 my code: data = [] data1 = [] result = [] fh = open('sheet1','r') for line in fh.readlines(): splitted = line.strip().split('\t') data.append(splitted[0]) data1.append(splitted[1]) for k in data: if k in data1: result.append(k) print result fh.close()
can you tell me problem with my script and what should is do for this regards shafreen
-- http://mail.python.org/mailman/listinfo/python-list