python how to find how many times a same number appeared in for loop code example Example: how to find the number of times a number appears in python dict((i, a.count(i)) for i in a)