Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 67

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

    Correct Answer: C, D

    To define a lambda in Python, the correct syntax is 'lambda arguments: expression'. Option A uses an incorrect syntax with '='. Option B also has incorrect syntax because 'return' is not used in lambda functions. Option C and Option D use the correct syntax of a lambda function, making both of them valid lambda definitions.

Discussion
DKAT2023Options: CD

C and D are correct