Use lambda for short, throwaway functions: python numbers = [3, 1, 4, 1, 5] sorted_nums = sorted(numbers, key=lambda x: -x) # [5, 4, 3, 1, 1] The key parameter expects a function. Lambda provides one without naming it. Don't use lambda for: Complex logic that needs multiple lines
Functions you'll reuse (give them a name)
Functions where a descriptive name helps readability When in doubt, use def. Lambda saves typing but can hurt readability.