为什么只有后两个元素倒序了?
这是代码:
user1 = {
'username': 'oliver',
'first': 'cai',
'last': 'jizhou',
}
for name in sorted(user1.values(),reverse=True):
print(f"The {name} is real.")
输出:
S D:\python_work> & D:/Python3.8.5/python.exe d:/python_work/demo92.py
The oliver is real.
The jizhou is real.
The cai is real.