def write_fasta(outfile, seq_dict):
    'Writes fasta with dictionary where keys are headers and values sequences.\n    \n    Key Arguments:\n        outfile.\n    '
    step = 70
    with open(outfile, 'w') as file:
        for (header, sequence) in seq_dict.items():
            sequence_list = [sequence[(i - step):i] for i in range(step, (len(sequence) + 1), step)]
            last = sequence[(step * (len(sequence) // step)):]
            if (last != ''):
                sequence_list.append(last)
            sequence = '\n'.join(sequence_list)
            file.write((((('>' + header) + '\n') + sequence) + '\n'))
Writes fasta with dictionary where keys are headers and values sequences.

Key Arguments:
    outfile.
def write_fasta(outfile, seq_dict):
    'Writes fasta with dictionary where keys are headers and values sequences.\n    \n    Key Arguments:\n        outfile.\n    '
    step = 70
    with open(outfile, 'w') as file:
        for (header, sequence) in seq_dict.items():
            sequence_list = [sequence[(i - step):i] for i in range(step, (len(sequence) + 1), step)]
            last = sequence[(step * (len(sequence) // step)):]
            if (last != ):
                sequence_list.append(last)
            sequence = '\n'.join(sequence_list)
            file.write((((('>' + header) + '\n') + sequence) + '\n'))