import re


def only_sequences(file):

    """
    First this function uses regular expressions to save only
    the sequences and not the fasta file headers, then the N's,
    quotes and hyphens are removed from the sequences.

    :param file: list
        This object contains all the lines of a fasta file
    :return: list
        Returns a list with the sequences ready to work with them
    """

    sequences = []
    for line in file:
        if re.search(r"[ATGC]", line):
            sequences.append(line)
        else:
            pass

    sequences_to_work = []
    for i, line in enumerate(sequences):

        sequence = str(line).replace('"', '')
        sequence = sequence.replace("N", '')
        sequence = sequence.replace('\n', '')
        sequences_to_work.append(sequence)

    return sequences_to_work