Because dic is a dictionary and is unordered, the result printed out may be different each time
And sorted(dic.item()) defaults to the first value of each tuple for the generated tuples ('k1', 1), ('k2', 2), ('k3', 3) Sort, so the printed result is ('k1', 1)
Dictionary is unordered and cannot be sorted,
sorted is just a list of key-value pair tuples of sorted d.
sorted(zip(d.keys(), d.values())) 可解
Because dic is a dictionary and is unordered, the result printed out may be different each time
And sorted(dic.item()) defaults to the first value of each tuple for the generated tuples ('k1', 1), ('k2', 2), ('k3', 3) Sort, so the printed result is ('k1', 1)