Want to find the positions where a pattern (substring) starts in another string in python

59 views Asked by At

Input:

strA = "ATATATGCGATAT"
strB = "ATAT"

output:

0 2 9

I was looking for a way to find the starting positions in a string (strA), every time a pattern (strB) starts.

0

There are 0 answers