s = 'gfdhbobobyui'
bob = 0
for x in range(len(s)):
if x == 'bob':
bob += 1
print('Number of times bob occurs is: ' + str(bob))
Attempting to write a code that will count the amount of times 'bob' appears in s, but for some reason this always outputs 0 for number of 'bob'.