- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path26-python-lambda-functions.py
More file actions
Latest commit
38 lines (20 loc) · 767 Bytes
/
Copy path26-python-lambda-functions.py
File metadata and controls
38 lines (20 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
defdouble_value(num):
result=num*2
returnresult
double_value(5)
#######################################################################################################################
defdouble_value(num):
returnnum*2
double_value(5)
#######################################################################################################################
defdouble_value(num): returnnum*2
double_value(5)
#######################################################################################################################
double_val=lambdanum: num*2
double_val(2)
even=lambdanum: num%2!=0
even(5)
revert_string=lambdastring: string[::-1]
revert_string("Hello")
sum_nums=lambdax, y: x+y
sum_nums(2, 3)