def write_seqs_to_fastq(fp, seqs, write_mode='w'):
 with open(fp, write_mode) as f:
  for s in seqs:
   f.write(format_fastq_record(s[0], s[1], s[3]))

def write_seqs_to_fastq ( fp , seqs , write_mode = 'w' ) : with open ( fp , write_mode ) as f : for s in seqs : f . write ( format_fastq_record ( s [ 0 ] , s [ 1 ] , s [ 3 ] ) )
write seqs to fp with specified write mode seqs: list of tuples .