Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('19.txt')
- texts = file.readlines()
- Max = 0
- Min = 10000000000000
- d = dict()
- s = ''
- s1 = ''
- for text in texts:
- s1 += text
- text = text.strip()
- if text.count('Q') > Max:
- Max = text.count('Q')
- s = text
- for c in s:
- if c in d:
- d[c] += 1
- else:
- d[c] = 1
- minc = ''
- for c in d:
- if d[c] < Min or d[c] == Min and c < minc:
- Mun = d[c]
- minc = c
- print(minc, s1.count(minc))
Advertisement
Add Comment
Please, Sign In to add comment