One liners in python Python one liners can be just as powerful as a long and tedious prorqagmm written in another language designed to do the same thing. In other languages(think: Java) this would be nearly impossible. But in python it is alot easier.
Lambda expressions (sometimes called lambda forms) are used to create anonymous functions.
The expression lambda parameters: expression yields a function object.
Syntax of Lambda Function in python
lambda arguments: expression
Lambda functions can have any number of arguments but only one expression. The expression is evaluated and returned. Lambda functions can be used wherever function objects are required.