Is there any algorithm to get number of repeating overlap substrings in an string? This question is similar to Splitting a Python list into a list of overlapping chunks, but in my case changed elements are first and last elements of each substring! for example when:
string = "HelloWorld"
k = 4
then:
subString = ["Hell","ello","lloW","loWo","oWor","Worl","orld"]
i tried this:
i = 0
while len(string[i+4:])>=4:
i+=1
print i