Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eder-projetos-dev/b85b1a61c67a163037e1e3af7cf63871 to your computer and use it in GitHub Desktop.
Save eder-projetos-dev/b85b1a61c67a163037e1e3af7cf63871 to your computer and use it in GitHub Desktop.
Python - Lambda functions
sum = lambda x, y: x + y
result = sum(5, 3)
@eder-projetos-dev
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment