Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('16.txt')
- text = file.readline()
- text = text.strip()
- d = dict()
- Max = 0
- Min = 10000000000000
- for c in text:
- if c in d:
- d[c] += 1
- Max = max(Max, d[c])
- else:
- d[c] = 1
- for elem in d:
- Min = min(Min, d[elem])
- print(Max - Min)
Advertisement
Add Comment
Please, Sign In to add comment