Created
June 3, 2023 17:10
-
-
Save eder-projetos-dev/b85b1a61c67a163037e1e3af7cf63871 to your computer and use it in GitHub Desktop.
Python - Lambda functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum = lambda x, y: x + y | |
result = sum(5, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lambda Functions
Lambda functions are great for writing concise and anonymous functions. I often use them when I need a simple function without defining it separately. For instance, I can use a lambda function to calculate the sum of two numbers on the fly.
These Python tricks have become indispensable in my coding journey. They have helped me write cleaner, more efficient code and have enhanced my productivity. I hope you find them as valuable and enjoyable to use as I do!
https://levelup.gitconnected.com/11-tricks-that-will-make-your-life-easier-as-a-python-developer-da29e4306675