Bad_Programist

Untitled

Dec 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. Text = []
  2. A = {}
  3. c = []
  4. S = []
  5. with open ('input.txt') as f:
  6.     for line in f:
  7.         for i in line.split():
  8.             Text.append(i)
  9.             A[i] = Text.count(i)
  10.             c.append(Text.count(i))
  11. for i in A:
  12.     if A[i] == max(c):
  13.         S.append(i)
  14. with open('output.txt', 'w') as F:
  15.     print(min(S), file = F)
Advertisement
Add Comment
Please, Sign In to add comment