Slide 57
Slide 57 text
But if substring is empty string, we get one more index than
the length
wat #4 - Possible!
>>> def count(s='foobar', sub=''):
... result = 0
... for i in range(len(s) + 1 - len(sub)):
... # range(6 + 1 - 0)
... # range(7)
... # [0, 1, 2, 3, 4, 5, 6]