dxnge

task 21

Sep 24th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. with open('24_demo.txt') as f:
  2.     a = f.readline()
  3.     a = a.replace('XYZ', '123').replace('123XY', '12312 ').replace('123X', '1231 ')\
  4.         .replace('X', ' ').replace('Y', ' ').replace('Z', ' ')
  5.  
  6. print(max(map(len, a.split())))
  7. #print(a)
Advertisement
Add Comment
Please, Sign In to add comment