Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- soma = 0
- word1 = "bob"
- for ans in range(0, (len(s)-2)):
- if s[ans] == "b" and s[ans+1] == "o" and s[ans+2] == "b":
- soma += 1
- print("Number of times bob occurs is: "+str(soma))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement