I've been working on this problem for hours now and I just can't seem to get it. My logic is so off with this one
Objective is to determine the amount of times the word "bob" occurs which is = 2, based on the expected output the problem is asking for.
I just don't know how to get there. I got as far as:
s = 'azcbobobegghakl'
bob = 0
for i in range(len(s)):
print(s[i: i+3])
print("Number of times bob occurs is: ", bob)
If anyone answers this, please explain to me how you got the answer. Thanks in advance