J
John
I have two strings S1 and S2. I want to know how many times
S2 occurs inside S1.
For instance
if S1 = "AAAA"
and S2 = "AA"
then the count is 3. Is there an easy way to do this in python?
I was trying to use the "count" function but it does not do
overlapping counts it seems.
Thanks,
--j
S2 occurs inside S1.
For instance
if S1 = "AAAA"
and S2 = "AA"
then the count is 3. Is there an easy way to do this in python?
I was trying to use the "count" function but it does not do
overlapping counts it seems.
Thanks,
--j