vadim_sharaf

Untitled

Oct 27th, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. with open ('zadanie24_2.txt') as f:
  2.     s = f.readline()
  3. s =  s.replace('LL', 'L L').replace('DD', 'D D').replace('RR', 'R R')\
  4.     .replace('LL', 'L L').replace('DD', 'D D').replace('RR', 'R R')
  5. print(max(map(len, s.split())))
Advertisement
Add Comment
Please, Sign In to add comment