About 892,000 results
Open links in new tab
  1. language agnostic - What is a lambda (function)? - Stack Overflow

    Aug 19, 2008 · A Lambda Function, or a Small Anonymous Function, is a self-contained block of functionality that can be passed around and used in your code. Lambda has different names in …

  2. What is a lambda expression, and when should I use one?

    Sep 26, 2023 · A lambda expression, sometimes also referred to as a lambda function or (strictly speaking incorrectly, but colloquially) as a lambda, is a simplified notation for defining and …

  3. language agnostic - What is a Lambda? - Stack Overflow

    "Lambda" refers to the Lambda Calculus or to a specific lambda expression. Lambda calculus is basically a branch of logic and mathematics that deals with functions, and is the basis of …

  4. What exactly is "lambda" in Python? - Stack Overflow

    Mar 8, 2011 · Also lambda can be used in an expression directly, while def is a statement. def f(x, y): return x + y Would give you almost the same result as. f = lambda x, y: x + y And you can …

  5. Is there a way to perform "if" in python's lambda? [duplicate]

    @Glenn Maynard: There's almost no reason to use a lambda, period. Assigning a lambda to a variable -- as a stand-in for def-- is generally a Very Bad Idea (tm). Just use a def so mere …

  6. python - List comprehension vs. lambda + filter - Stack Overflow

    by_attribute = lambda x: x.attribute == value xs = filter(by_attribute , xs) Yes, that's two lines of code instead of one, but you clean filter expression from cumbersome lambda and by naming …

  7. Can Lambda continue after returning response? - Stack Overflow

    Aug 14, 2019 · API Gateway will instantly return the response and then Step Function will take over and trigger the Lambda function and it will ensure that Lambda executes till the end. You …

  8. What is `lambda` in Python code? How does it work with `key` …

    A lambda is an anonymous function: >>> f = lambda: 'foo' >>> print(f()) foo It is often used in functions such as sorted() that take a callable as a parameter (often the key keyword …

  9. How do I define a method which takes a lambda as a parameter in …

    Nov 28, 2012 · Lambda expression can be passed as a argument.To pass a lambda expression as an argument the type of the parameter (which receives the lambda expression as an …

  10. Understanding lambda in Python and using it to pass multiple …

    Because a lambda is (conceptually) the same as a function, just written inline. Your example is equivalent to . def f(x, y) : return x + y just without binding it to a name like f. Also how do you …

Refresh