Farz0l1x

Untitled

Dec 12th, 2022
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. file = open('7.txt')
  2. s = file.readline()
  3. count = 0
  4. for i in range(3, len(s)):
  5.     if s[i-3] == 'G' and s[i-1] == 'M' and s[i] == 'E':
  6.         count += 1
  7. print(count)
Advertisement
Add Comment
Please, Sign In to add comment