I'm not able to get the number of occurrences of a substring that has n-lenght in a string. For example if the string is
CCCATGGTtaGGTaTGCCCGAGGT
and n is
3
The output must be something like :
'CCC' : 2, 'GGT' :3
The input is a list of lists so I get evry string of list but Im not able to go ahead and the output is the dic of all strings
Code:
def get_all_n_repeats(n,sq_list):
reps={}
for i in sq_list:
if not i:
continue
else:
for j in i:
........#Here the code I want to do#......
return reps