iterate over a dictionary `dict` in sorted order,return sorted(dict.items())