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

    Aug 19, 2008 · 6 As you can see from the snippet of Python, the function adder takes in an argument x, and returns an anonymous function, or lambda, that takes another argument y. That anonymous …

  2. 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 parts of a …

  3. 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 up and harder …

  4. python - How are lambdas useful? - Stack Overflow

    As stated above, the lambda operator in Python defines an anonymous function, and in Python functions are closures. It is important not to confuse the concept of closures with the operator lambda, which is …

  5. 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 lambda, see …

  6. 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 your_pkg_layer.zip . …

  7. How to kill/terminate a running AWS Lambda function?

    Mar 25, 2019 · I have a lambda function that runs over a period of ~10mins. Decently long for a Lambda but given our current needs/setup it's the simplest way for it to do what we need it to do. However, a …

  8. How to use await in a python lambda - Stack Overflow

    An " async lambda " would be an anonymous asynchronous function, or in other words an anonymous function evaluating to an awaitable. This is in parallel to how async def defines a named function …

  9. python - Why use lambda functions? - Stack Overflow

    I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another functi...

  10. sorting - How to sort with lambda in Python - Stack Overflow

    Sep 22, 2010 · 15 You're trying to use key functions with lambda functions. Python and other languages like C# or F# use lambda functions. Also, when it comes to key functions and according to the …