06-19-2025, 11:29 PM
(This post was last modified: 06-19-2025, 11:30 PM by queue.
Edit Reason: lamba -> lambda. i can spell trust!
)
yes, precisely! in this example here:
################################
example = lambda arg1, arg2 : print(arg1 + arg2)
example(25, 25) # --> 50
################################
"lamba arg1, arg2" are the arguments (essentially equiv. to def example(arg1, arg2)). after the ":" is where the code to the actual function goes. (in this case print(arg1 + arg2)).
################################
example = lambda arg1, arg2 : print(arg1 + arg2)
example(25, 25) # --> 50
################################
"lamba arg1, arg2" are the arguments (essentially equiv. to def example(arg1, arg2)). after the ":" is where the code to the actual function goes. (in this case print(arg1 + arg2)).