from collections import Counter data = ['Java', 'Python', 'Java', 'C++', 'Python', 'PHP', 'C++', 'Java', 'PHP', 'Java', 'Python'] c = Counter(data) print(c.most_common(3))
from collections import Counter data = ['Java', 'Python', 'Java', 'C++', 'Python', 'PHP', 'C++', 'Java', 'PHP', 'Java', 'Python'] c = Counter(data) print(c.most_common(3))