Have you ever seen the word lambda used in Python?
sorted_by_values = sorted(items, key=lambda i: i[1])That's called a "lambda expression" and it defines a "lambda function".
https://www.pythonmorsels.com/lambda-expressions/
#python
👉 @python_real
РЕ Реальный Python @python_real · 3.64K subscribers sorted_by_values = sorted(items, key=lambda i: i[1])