+ 4

What is lambda in Python

2nd Mar 2022, 9:35 AM
David Mphande
David Mphande - avatar
4 ответов
+ 3
lambda is a small anonymous function that can take any number of arguments, but can only have one expression. sum = lambda num : num + 10
2nd Mar 2022, 9:46 AM
Musa Hodman
Musa Hodman - avatar
+ 1
Lambda is a python anonymous one-line function; #basic function #syntax: def f_name(args): <some process> return value #eg. def add(x, y): return x+y #lambda function #syntax f_name = (lambda args : value) #eg. add = (lambda x,y: x+y)
2nd Mar 2022, 10:15 AM
Sousou
Sousou - avatar
+ 1
name<f>
2nd Mar 2022, 5:49 PM
هشام مشاغيب
هشام مشاغيب - avatar