Re: [Tutor] Tab delim file

2005-03-01 Thread Liam Clarke
Hi Srinivas, You want to use the csv module, it's designed for this kind of stuff. http://docs.python.org/lib/module-csv.html So, I think for your thing you'd want = import csv f1 = open('my_file.txt','r') reader = csv.reader(f1) reader.delimiter = '\t' fileA = [] fileB = [] for row in read

[Tutor] Tab delim file

2005-03-01 Thread Srinivas Iyyer
Hello: I have a nasty file where I have 165 column and 140K lines. For every 12 columns, a new dataset is written. 0-12 - File A's data is there 13-24 - File B's data is there. My task is to write data in each 12 columns to a file. I have a rough idea, but when I try I am unable to proceed