Farz0l1x

Untitled

Mar 5th, 2024
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. file = open('7.txt')
  2. A = file.readline()
  3. A = A.replace('AB', '*')
  4. A = A.replace('BC', '*')
  5. s = '*'
  6. while s in A:
  7.     s += '*'
  8. s = s[1:]
  9. print(len(s))
Advertisement
Add Comment
Please, Sign In to add comment