Define iteritems for Python 3
next() method to function