I need to find the highest number of consecutive occurrence of a sub-string in a string for example in
s = "abccddababdd"
nof_ab = s.count('ab')
I want it to return
2
not
3
I tried the count function but it returns the total count of occurrence in the string not the highest number of consecutive occurrence
how can I do this?