I need to count the nunber of times the substring \'bob\' occurs in a string.
\'bob\'
Example problem: Find the number of times \'bob\' occurs in string s such
def count_substring(string, sub_string): count=a=0 while True: a=string.find(sub_string) string=string[a+1:] if a>=0: count=count+1; else: break return count