There are two occurrences of 'aba' in 'ababa' (0th index and 2nd index):
myString = 'ababa'
print(myString.count('aba'))
Yet this code outputs a value of: 1
I know this issue seems really simple, but shouldn't the answer be 2 here?
If not, then isn't the count function not really doing what it's supposed to?
Is there a simple alternative?