You are viewing a single comment's thread. Return to all comments →
len([i for i in range(len(s)) if s[i:i+len(b)] == b])
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 →
len([i for i in range(len(s)) if s[i:i+len(b)] == b])