Farz0l1x

Untitled

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