blob: cc8171dcb72df706d96e4c11a0ff336a5dc92823 (
plain)
1
2
3
4
5
6
7
8
9
|
from collections import Counter
def second_frequent(input):
dict = Counter(input)
value = sorted(dict.values(), reverse=True)
second_large = value[1]
for (key, val) in dict.items():
if val == second_large:
return (key)
|