Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Text = []
- A = {}
- c = []
- S = []
- with open ('input.txt') as f:
- for line in f:
- for i in line.split():
- Text.append(i)
- A[i] = Text.count(i)
- c.append(Text.count(i))
- for i in A:
- if A[i] == max(c):
- S.append(i)
- with open('output.txt', 'w') as F:
- print(min(S), file = F)
Advertisement
Add Comment
Please, Sign In to add comment