Certified Associate in Python Programming (PCAP-31-03) — Question 65

Which of the following lambda definitions are correct? (Choose two.)

Answer options

Correct answer: C, D

Explanation

Options C and D are correct lambda function definitions in Python. Option C correctly returns a tuple of the inputs, while option D performs a valid calculation. Options A and B are incorrect due to syntax errors; A uses an invalid assignment operator and B incorrectly uses 'return' within a lambda expression.