I read in a tab delimited text file, then I have a list for each line, then I index the first record of each list, then I write it to a file. code below:
import csv z = csv.reader(open('output.blast'), delimiter='\t') k = open('output.fasta', 'w') for row in z: print row[1:12] for i in row[1:12]: k.write(i+'\t')
When writing to a file, it writes it as one long line, I would like a new line to start after the 11th (last) record in each list. But I canβt figure out where to put the new charater line
source share