Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Program to find the number of times a substring occurs in a given string
- text=raw_input("Enter the text:")
- count=0
- length=len(text)
- for i in range(0,length):
- if text[i]=='E' and text[i+1]=='A' and text[i+2]=='T':
- count+=1
- print count
- raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement