#!/usr/local/bin/python2 from collections import OrderedDict for i in xrange(10000): d = OrderedDict((('1', 1),('2', 2),('3', 3))) next(d.iterkeys())