I\'m trying to find the number of times \'bob\' occurs in a string of characters like \'abdebobdfhbobob\'.
My code (that I found through another stackoverflow question)
why do not you make it easy?
bobc=0 for i in range (0,len(s)-2): if s[i:i+3]=='bob': bobc+=1 i=+1 print('Number of bob:'+str(bobc))