Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s= 'aaaarytartugaasstsyssss'
- d = dict()
- Max = 0
- for c in s:
- if c in d:
- d[c] += 1
- Max = max(Max, d[c])
- else:
- d[c] = 1
- a = []
- for c in d:
- if d[c] == Max:
- a.append(c)
- a.sort()
- print(a[0])
Advertisement
Add Comment
Please, Sign In to add comment