This is the code I have so far.
def find_duplicate_integers(arg):
stats = {}
for i in arg:
if i > 1:
if i in stats:
stats[i] += 1
else:
stats[i] = 1
return stats
This is the result I want
>>> find_duplicate_integers([1, 1, 3, 2, 3, 1, 0])
{1: 3, 3: 2}
But this is the result I get
>>> find_duplicate_integers([1, 1, 3, 2, 3, 1, 0])
{2: 1, 3: 2}
I apologize if this is due to a basic mistake, but I cannot figure out how to make this work. Any help would be greatly appreciated!