Use .items() instead of .iteritems() for Python 3.x compatibility