# An OD is represented by a list of tuples, so would this work? d = OrderedDict([('b', 2), ('a', 1)])