Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('18.txt')
- text = file.readline()
- count = 0
- for i in range(len(text) - 4):
- if text[i - 4] == 'C' and text[i - 3] == 'B' and text[i - 1] == 'B' and text[i] == 'C':
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment