Advertisement
Farz0l1x

Untitled

Mar 27th, 2024
380
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('11.txt')
  2. s = file.readline()
  3. for i in 'XYZ':
  4.     while i + i in s:
  5.         s = s.replace(i + i, i + ' ' + i)
  6. s = s.split()
  7. print(len(max(s, key = len)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement