0

tell me how to use lambda funtion!??????

i am starting pyspark i wanna know what are the import concepts function need to learn inorder to start python

20th Sep 2021, 3:34 AM
Vigneshwara Mahabaleshwara Naik
Vigneshwara Mahabaleshwara Naik - avatar
1 Answer
+ 3
lambda x,y: x + y def fun(x,y): return x + y You can use a lambda function immediately after the difinition: print((lambda x: x*2)(5)) 》10 And it's useful when you need a function temporarily: lst = list(map(lambda x: x+2, [0,1])) print(lst) 》[2,3]
20th Sep 2021, 4:20 AM
Arsalan [Inactive]
Arsalan [Inactive] - avatar