1. Syntax and Limitations of Lambdas
Single Expression, Implicit Return
- Syntax: `lambda arguments: expression`.
- Lambdas can take any number of arguments, but can only contain a single expression — no statements, loops, or assignments.
- The result of the expression is implicitly returned.
square = lambda x: x ** 2
print("5 squared:", square(5))
💡 Key Takeaway: Use lambdas for short inline helpers; use def statements for any multi-line or documented logic.