Functional programming in Python is possible with the use of lambda map reduce and filter functions. This article briefly describe use of each these functions.
Lambda : Lambda specifies an anonymous function. It is used to declare a function with no name; When you want to use function only once. But why would you declare a function if you don't want to reuse the code? Read on you'll see.
Syntax: lambda arg1, arg2 : expression
lambda x : x*x
This lambda expression with just one argument x which returns square of x.
Map : It takes two arguments, the first argument is name of a function and second argument is a sequence. map() applies function f to all elements in the sequence and returns a