sorted

#!/usr/bin/python3
​
l = {'b':90,'a':80,'c':100 }
print(sorted(l))
print(sorted(l.values()))
print(sorted(l,key=lambda key:l[key]))
print(sorted(zip(l.values(),l.keys())))
print(sorted(zip(l.keys(),l.values())))

 

posted @ 2019-02-18 16:37  狂奔~  阅读(233)  评论(0编辑  收藏  举报