Länk - Count the number of occurrences of items in a python sequence
Found this on stackoverflow:
dict((i,a.count(i)) for i in a)
Read more: How to calculate the occurrences of a list item in Python? - Stack Overflow
Found this on stackoverflow:
dict((i,a.count(i)) for i in a)
Read more: How to calculate the occurrences of a list item in Python? - Stack Overflow