Posts

Showing posts from April, 2017

Recursion and lambda function in python

Image
Recursion and lambda function in python Hello Friends, I am Nirav. And in this tutorial I going to show you Recursion and lambda function in Python.. So, Let's get Started Recursive           We know that a function can call other functions. it is even possible for the function to call it self. These type of construct are termed as recursive function. EX:- Example for Factorial value using recursive Advantage of recursive           1.)It's make code clean and elegant           2.)Sequence generation is easier Disadvantage of recursive           1.)logic behind recursion is hard to follow           2.)It's hard to debug Lambda           Lambda is a function which define without name           In python normal functions are define using def keyword but lambda function are define using lambda keyword. Syntax:-  lambda argument = expression Ex:- Example of lambda function for double value Use of lambda fun