Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Solution: DNA sequencing other

from dna_sequencing import get_sequences


if __name__ == '__main__':
    dna = 'ACCGXXTXXYYGTTQRACQQTGGGCXTTGTXX'

    filtered = []
    for cr in dna:
        if cr in 'ACGT':
            filtered.append(cr)
        else:
            filtered.append('X')
    #print(filtered)

    dna = ''.join(filtered)

    short_sequences = get_sequences(dna)
    print(short_sequences)