A
A
Alexander Bureyko2021-12-15 22:52:09
Python
Alexander Bureyko, 2021-12-15 22:52:09

What is the parameter i after declaring the lambda function?

Hello, I have some questions while learning lambda expressions. What is the parameter i after declaring the lambda function?

points = [{ 'x' : 2, 'y' : 3 }, { 'x' : 4, 'y' : 1 }]
points.sort(key=lambda i : i['y'])
print(points)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Pankov, 2021-12-15
@alexander1212

Nothing after the announcement.
A function in python is an object of the first kind, before it is called, the arguments are not defined and the context is not created, but the context is created with each call.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question