iterate over a dictionary in sorted order,it = iter(sorted(d.items()))