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

    Aug 19, 2008 · Lambda calculus codifies the correct way to do these substitutions. Given that y = x−1 is a valid rearrangement of the second equation, this: λ y = x−1 means a function …

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

    I saw some examples using built-in functions like sorted, sum etc. that use key=lambda. What does lambda mean here? How does it work? For the general computer science concept of a …

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

    An easy way to perform an if in lambda is by using list comprehension. You can't raise an exception in lambda, but this is a way in Python 3.x to do something close to your example:

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

    Here is another really good reference which explains very well what are lambda expressions in C++: Microsoft.com: Lambda expressions in C++. I especially like how well it explains the …

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

    Mar 8, 2011 · The lambda construct is a shorter way to define a simple function that calculates a single expression. The def statement can be inconvenient and make the code longer, broken …

  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. How do add python libraries to AWS Lambda? - Stack Overflow

    Feb 7, 2023 · To use any 3rd party library in lambda you can use a lambda layer. install the dependency using following command pip3 install <your_package> -t . zip the package zip -r …

  8. What is the difference between a 'closure' and a 'lambda'?

    The closure of a lambda expression is this particular set of symbols defined in the outer context (environment) that give values to the free symbols in this expression, making them non-free …

  9. python - Syntax behind sorted (key=lambda: ...) - Stack Overflow

    I don't quite understand the syntax behind the sorted() argument: key=lambda variable: variable[0] Isn't lambda arbitrary? Why is variable stated twice in what looks like a dict?

  10. Can an AWS Lambda function call another - Stack Overflow

    Jul 30, 2015 · I have 2 Lambda functions - one that produces a quote and one that turns a quote into an order. I'd like the Order lambda function to call the Quote function to regenerate the …