You are viewing a single comment's thread. Return to all comments →
like mine
def count_substring(string, sub_string): counter = 0 sub_len = len(sub_string) for i in range(0, len(string)): if string[i] == sub_string[0]: if string[i:(i + sub_len)] == sub_string: counter = counter + 1 return counter
Seems like cookies are disabled on this browser, please enable them to open this website
Find a string
You are viewing a single comment's thread. Return to all comments →
like mine