'Iterator over elements repeating each as many times as its count.
>>> c = Counter(\'ABCABC\')
>>> sorted(c.elements())
[\'A\', \'A\', \'B\', \'B\', \'C\', \'C\']
If an element\'s count has been set to zero or is a negative number,
elements() will ignore it.'

def elements(self):

    for (elem, count) in iteritems(self):
        for _ in repeat(None, count):
            (yield elem)
