Answer:
#Python
1. def Triad(dna):
2. dna = list(dna)
3. fourTriad = dna[7:19]
4. print(fourTriad)
5. return(dna)
Step-by-step explanation:
We define a function called Triad that receives a string with a DNA sequence composed of A-C-G-T letters, then we transform this string into a list, to finally take the elements 7 to 18 (In python the first element is the element zero).
An example of the code:
Triad('ACAAGTCGATGAGCGATGCGATCAGTAGCGGGCTGGATGCTGCTAGATCGCAGCATGACGTACTGACTGT')
Output:
['G', 'A', 'T', 'G', 'A', 'G', 'C', 'G', 'A', 'T', 'G', 'C']