Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('24 (1).txt') as f:
- a = f.readline()
- a = sorted(map(lambda x: x[2], filter(lambda x: x[0] == x[1], zip(a, a[1:], a[2:]))))
- def f(b, c):
- if b == c:
- return b
- if b != c:
- return b + ' '
- b = ''.join(map(f, a, a[1:])).split()
- b[-1] = b[-1] + 'Z'
- sln = list(map(len, b))
- print(b[sln.index(max(sln))][0])
Advertisement
Add Comment
Please, Sign In to add comment