python lambda, map, & filter

The lambda operator or function is used for creating small, one-time anonymous function objects. Its form is lambda arguments : expression. It can have any number of arguments but can have only one expression.

Map functions expect a function object and any number of iterables like a list. It executes the function object on each element of the iterable in a sequence and returns a list of elements modified by the function object.

The filter function expects two arguments: a function object and an iterable. The function returns a boolean value. The function is called for each iterable element and returns only those elements for which the function returns true.