Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jim Gibson Newsgroups: comp.lang.python Subject: Re: finding data from two different files. Date: Fri, 18 Oct 2013 15:54:44 -0700 Lines: 37 Message-ID: <181020131554447773%jimsgibson@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: individual.net COk5jlpY9eIkdStLuOnG4gMCldjtwfCfP7E8gheYv70QyH+98/ X-Orig-Path: jimsgibson Cancel-Lock: sha1:i6y6V1Na9FLQcsYvLF2jV5VAJrs= User-Agent: Thoth/1.9.0 (Mac OS X) Xref: csiph.com comp.lang.python:57083 In article , <"torque.india@gmail.com"> wrote: > Hi all, > > I am new to python, just was looking for logic to understand to write code in > the below scenario. > > I am having a file (filea) with multiple columns, and another file(fileb) > with again multiple columns, but say i want to use column2 of fileb as a > search expression to search for similar value in column3 of filea. and print > it with value of rows of filea. > > filea: > a 1 ab > b 2 bc > d 3 de > e 4 ef > . > . > . > > fileb > z ab 24 > y bc 85 > x ef 123 > w de 33 > > Regards../ omps Interestingly, somebody named "Om Prakash Singh" asked the identical question on the perl beginners list, except with the word "perl" substituted for "python". Is this a homework problem? Are you unsure about which language to use? Are you comparison shopping? -- Jim Gibson