def load_fasta_file ( filename ) : with open ( filename , "r" ) as handle : records = list ( SeqIO . parse ( handle , "fasta" ) ) return records
fasta file parsing biopython to get sequence only
Load a FASTA file and return the sequences as a list of SeqRecords
def load_fasta_file(filename):
    """Load a FASTA file and return the sequences as a list of SeqRecords

    Args:
        filename (str): Path to the FASTA file to load

    Returns:
        list: list of all sequences in the FASTA file as Biopython SeqRecord objects

    """

    with open(filename, "r") as handle:
        records = list(SeqIO.parse(handle, "fasta"))
    return records