Contact: aviboots(AT)netvision.net.il
39,890 questions
51,821 answers
573 users
from collections import Counter lst = ["python", "php", "php", "c++", "php", "c++", "java"] result = Counter(lst) print(result) ''' run: Counter({'php': 3, 'c++': 2, 'python': 1, 'java': 1}) '''