[Tutor] Code optmisation

2008-04-04 Thread yogi
Hi , Here is my first usable Python code. The code works. Here is what I'm trying to do. I have two huge text files. After some processing, One is 12M (file A) and the other 1M (file B) . The files have columns which are of interest to me. I 'm trying to match entries of column [0] on fi

Re: [Tutor] Python Newbie: Lost in Loop

2008-04-04 Thread yogi
Hi all , Thanks for the input. I must add Kent's solution was the fastest. The actual file to parse is 12MB. Though Eric's solution was more readable ( atleast for me). Now that I have the logic and code right I have to work on the real problem. Thanks in advance, yogesh

[Tutor] Python Newbie: Lost in Loop

2008-04-04 Thread yogi
Hi all, I ´m a Python Newbie. Just 48 hrs into Python. I am trying to parse a file which is tab spaced. head -5 of the file in question. 1 rs3094315 0 792429 1 rs6672353 0 817376 1 rs4040617 0 819185 1 rs2980300 0 8