Handling <dict>.iteritems for both python 2 & 3