You are viewing a single comment's thread. Return to all comments →
Happy with my code as it is easy to ready and digest
def count_substring(string, sub_string): x = len(string) y = len(sub_string) count = 0 for i in range(0, x): if sub_string == string[ i : i+y ]: count += 1 return count
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 →
Happy with my code as it is easy to ready and digest