def write_seqs_to_fasta(fp, seqs, write_mode='w'):
 with open(fp, write_mode) as f:
  for s in seqs:
   f.write(('>%s\n%s\n' % s))

def write_seqs_to_fasta ( fp , seqs , write_mode = 'w' ) : with open ( fp , write_mode ) as f : for s in seqs : f . write ( ( '>%s\n%s\n' % s ) )
write seqs to fp with specified write mode seqs: list of tuples .