# dict[key1] == value1
# sorted(iterable,reverse:bool=False)方法,默认按升序给可迭代对象排序,返回列表;
# 如果可迭代对象是字典,对字典的键排序,返回的列表里也只含字典的键
operator_dict = {"<": "less than", "==": "equal"}
print('Here is the original dict:')
for key in sorted(operator_dict):
    print(f"Operator {key} means {operator_dict[key]}.")
print()
operator_dict[">"] = "greater than"
print('The dict was changed to:')
for key in sorted(operator_dict):
    print(f"Operator {key} means {operator_dict[key]}.")