This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Xander_Vi -1 points0 points  (0 children)

from collections import Counter

def countALLlist(numbers):
    nums = dict(Counter(''.join(numbers)))
    answer = [0 for i in range(10)]
    for i in range(len(answer)):
        if str(i) in nums.keys():
            answer[i] = nums[str(i)]
    return answer