Re: [Tutor] Using lambda

2015-08-24 Thread Alan Gauld
On 24/08/15 07:38, rakesh sharma wrote: I am beginner in pythonI see the use of lambda has been for really simple ones as in the numerous examples over the net.Why cant we use lambda in another one like g = lambda x: (lambda y: y + 1) + 1when I am able to do that in two lines h = lambda x: x +

Re: [Tutor] Using lambda

2015-08-24 Thread Cameron Simpson
On 24Aug2015 12:08, rakesh sharma wrote: I am beginner in pythonI see the use of lambda has been for really simple ones as in the numerous examples over the net.Why cant we use lambda in another one like g = lambda x: (lambda y: y + 1) + 1 when I am able to do that in two lines >>> h = lambda

[Tutor] Using lambda

2015-08-23 Thread rakesh sharma
I am beginner in pythonI see the use of lambda has been for really simple ones as in the numerous examples over the net.Why cant we use lambda in another one like g = lambda x: (lambda y: y + 1) + 1when I am able to do that in two lines h = lambda x: x + 1>>> h(12)13y = lambda x: h(x) + 1>>> y(1)