On 1 Jun 2005 [EMAIL PROTECTED] wrote:
> I have a load of files I need to process. [text cut] > So basically its a table, separated with tabs. What I need to do is make > a new file where all the entries in the table are those where the values > in columns 1 and 5 were present as a pair more than once in the original > file. Hi Chris, Have you thought about sorting? If you sort them based on specific columns, then elements with the same columns will cluster together in runs. So you may not even need Python much in this case; pipine your input through a 'sort -k1,5' might do the brunt of the work. If you want to do this with Python alone, that's doable too in a fairly straightforward way. Are you familiar with the "dictionary" data structure yet? Best of wishes to you! _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor