I want to know what exactly is lambda in python? and where and why it is used.
thanks
Lambdas are not anonymous functions.  Lambdas are anonymous expressions.
They're accessed like functions, but they're not the same thing.  Functions allow complex tasks: flow control, variable declarations and lists of statements containing expressions.  Expressions are merely one part of a function, and that's what lambdas give you.  They're severely limited compared to functions.
Python does not support anonymous functions.  For examples of languages that do, see Javascript and Lua.
(Note: It's correct to call lambdas anonymous functions in functional languages, where the mathematical definition of "function" is used, but in procedural languages the word has a very different meaning than in mathematics.)
What exactly is "lambda" in Python?