123>>> d = {'a': 10, 'b': 15, 'c': 4} >>> list_keys = list(d.keys()) >>> list_keys.sort() >>> for i in list_keys: ... print(i, ':', d[i]) ... a : 10 b : 15 c : 4