You are viewing a single comment's thread. Return to all comments →
Isn't This Simpler :
count = 0 for n in range (len(string),0,-1): try : if string[n-len(sub_string):n] == sub_string : count +=1 except IndexError : break
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 →
Isn't This Simpler :