Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import Counter
- s1 = []
- s = list(input().lower().split())
- for i in range(len(s)):
- s[i] = list(s[i])
- for j in range(len(s[i])):
- if s[i][j].isalpha() == False:
- s[i][j] = s[i][j].replace(s[i][j], '')
- s[i] = ''.join(s[i])
- c = Counter(s)
- c = dict(c.most_common(2))
- for k in c.keys():
- s1.append(k)
- print(s1[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement