def open_fasta_file(fasta):
    """
    This function takes a simple or multi-FASTA file and returns a list
    containing the IDs and the sequences of each DNA chain in the file.

    PARAMETERS
    ----------
    fasta : string
        filename of a FASTA file

    RETURNS
    -------
    File : tuple of strings
        the tuple contains the ID of the read/sequence and the DNA sequence
    """

    ID,Sequence,File=[],[],[]

    for line in fasta: # This for loop iterates for all the lines in the FASTA file. It checks
        # if the line is the ID of sequence [">" symbol contained] or it is the sequence itself.
        if ">" in line:
            ID.append(line)
            Sequence.append("")
        else:
            line=line.strip("\n")
            Sequence[-1]=Sequence[-1]+line

    for i in range(len(ID)): File.append([ID[i],Sequence[i]])

    return File