forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice



Given strings x and s, count the occurrences of s as a substring of x. These substrings may be overlapping.

count_overlapping('abcabcabc', 'ab') → 3
count_overlapping('abcabcabc', 'abca') → 2
count_overlapping('hohohohoh!', 'hoh') → 4

...Save, Compile, Run (ctrl-enter)

def count_overlapping(x, s):

Editor font size %:
Shorter output

Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 199

Copyright Nick Parlante 2017 - privacy