dic={"name":"zs","age":18,"city":"深圳","tel":"1362626627"},按键值升序排序

通过sorted结合key参数排序,再重新组成字典

dic = {"name":"zs","age":18,"city":"深圳","tel":"1362626627"}

tmp = sorted(dic.items(), key=lambda x: x[0])

print(dict(tmp))