def read_fasta(filename):
    'Returns a list of tuples of each header and sequence in a fasta (or multifasta) file.\n    first element in tuple is header and second the sequence.\n    \n    Key Arguments:\n        filename -- fasta file.\n    '
    tmp_seq = None
    seqs_list = []
    with open(filename, 'r') as fasta_file:
        for line in fasta_file:
            line = line.replace('\n', '')
            if ('>' in line):
                if (tmp_seq != None):
                    seqs_list.append((hd, tmp_seq))
                tmp_seq = ''
                hd = line.replace('>', '')
            else:
                tmp_seq += line
        seqs_list.append((hd, tmp_seq))
    try:
        assert (len(seqs_list) > 0)
    except AssertionError:
        print('The selected file is not a Fasta file.')
    else:
        return seqs_list
Returns a list of tuples of each header and sequence in a fasta (or multifasta) file.
first element in tuple is header and second the sequence.

Key Arguments:
    filename -- fasta file.
def read_fasta(filename):
    'Returns a list of tuples of each header and sequence in a fasta (or multifasta) file.\n    first element in tuple is header and second the sequence.\n    \n    Key Arguments:\n        filename -- fasta file.\n    '
    tmp_seq = None
    seqs_list = []
    with open(filename, 'r') as fasta_file:
        for line in fasta_file:
            line = line.replace('\n', )
            if ('>' in line):
                if (tmp_seq != None):
                    seqs_list.append((hd, tmp_seq))
                tmp_seq = 
                hd = line.replace('>', )
            else:
                tmp_seq += line
        seqs_list.append((hd, tmp_seq))
    try:
        assert (len(seqs_list) > 0)
    except AssertionError:
        print('The selected file is not a Fasta file.')
    else:
        return seqs_list