Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open ('zadanie24_2.txt') as f:
- s = f.readline()
- s = s.replace('LL', 'L L').replace('DD', 'D D').replace('RR', 'R R')\
- .replace('LL', 'L L').replace('DD', 'D D').replace('RR', 'R R')
- print(max(map(len, s.split())))
Advertisement
Add Comment
Please, Sign In to add comment