2
The answer to your specific question is that if dna_data[i] == formation_count_small[j] compares an int to a string.
However, there are several other problems, so I'm going to offer advice.
Don't hardcode the specific sequences being looked for. The first line of the csv file has the information, get it from there. Then there's no need to look at the exact ...
1
The proximate cause of the infinite loop is this while in the repeatss function:
while dna_str[j : j + len_str] in str_csv[i]:
curr_str += 1
j += len_str
In python, if i is greater than len(s) in slice notation (s[i : j]), it returns the empty string (even though s[i] would return index out of range error).
From ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
pset6 × 856server × 212
python × 109
load × 89
parse × 86
dna × 83
check50 × 56
similarities × 45
indexes × 43
cs50x × 36
speller × 24
lookup × 23
error × 21
mario × 18
segmentation-fault × 18
sentiments × 18
webserver × 18
pset6python × 17
analyzer × 16
check × 14
caesar × 13
pset6-sentiments × 13
pset6-dna × 12
c × 11
tweets × 11