Problem with this code and i can't understand the lambda function

前端 未结 0 1450
走了就别回头了
走了就别回头了 2021-01-30 15:37

Hy guys, i have a question about this code in python.

xs = {\'a\': 4, \'b\': 3, \'c\': 2, \'d\': 1}

xm = sorted(xs.items(), key = lambda x : x[1])

print(xm)

相关标签:
回答
  • 消灭零回复
提交回复
热议问题