I read in a text file that is tab delimited, i then have a list for each line, i then index out the first entry of each list, i then write this 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 the file it writes it as one long line, i would like a new line to be started after the 11th (last) entry in each list. But i cannot figure out where to put the new line charater