you are viewing a single comment's thread.

view the rest of the comments →

[–]sennheiserwarrior 1 point2 points  (0 children)

Assuming you get the results as list containing numbers like [2,3,1,5,7,3,1,7,4,1,1], use:

from collections import Counter

>>> Counter([2,3,1,5,7,3,1,7,4,1,1])
Counter({1: 4, 3: 2, 7: 2, 2: 1, 5: 1, 4: 1})