data_dict = {"k1":1,"k3":3,"k2":4}
new_data_dict = dict(sorted(data_dict.items()))
print(new_data_dict)
>>>{'k1': 1, 'k2': 4, 'k3': 3}