dct = {'b': 2, 'a': 3, 'c': 1}

for key, value in sorted(dct.items()):
    print(key, value)
a 3
b 2
c 1