I have a list in python that looks like this:
data = ['12,34,212,90,1,8','901,2,1,8,44,1,1','77,32,11,230,894','78,23,45,89,12,20']
How do I count the number of occurrences for each number?
Output should be something like...
12:x
34:x
212:x
Where x is the number of times the value is found in the whole list
I've tried the following but not working as intended.
d = {}
#[ d.update( {i:d.get(i, 0)+1} ) for i in data ]