Develop a python code to print a dictionary’s key-value pairs in sorted order of keys.
{'a': 5, 'c': 10, 'b': 4}
my_dict = {'a': 5, 'c': 10, 'b': 4}

for key in sorted(my_dict):
    print(key, my_dict[key])

# Output:
# a 5
# b 4
# c 10