Skip to content

Commit d369b70

Browse files
authored
implementation of anonymous(lambda) function
1 parent 222696f commit d369b70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#anonymous function
2+
add = lambda x, y: x + y
3+
result = add(3, 4)
4+
print(result) # Output: 7

0 commit comments

Comments
 (0)