from collections import Counter
lst = ['python', 'c', 'c++', 'c', 'c++', "c++", "swift"]
print(Counter(lst).keys())
print(Counter(lst).values())
print(Counter(lst))
'''
run:
dict_keys(['python', 'c', 'c++', 'swift'])
dict_values([1, 2, 3, 1])
Counter({'c++': 3, 'c': 2, 'python': 1, 'swift': 1})
'''