You can download this code by clicking the button below.
This code is now available for download.
This function takes a dictionary as input and returns a new dictionary sorted by the alphabetical order of keys.
Technology Stack : Sorting
Code Type : Function
Code Difficulty :
def aordict(data):
"""
对字典数据按照键的字母顺序排序。
"""
return dict(sorted(data.items()))