Entering edit mode
6.3 years ago
Heloooooooo
•
0
can someone solve this for me?
Write a function 'kmers' that count the kmers of length 3. It should get a DNA sequence and return a dictionary with the substrings of length 3 as keys and the number of occurrences in the sequence as value. Example:
kmers('CGCTAACGCAC') = {'AAC': 1,
'ACG': 1,
'CAC': 1,
'CGC': 2,
'CTA': 1,
'GCA': 1,
'GCT': 1,
'TAA': 1}