PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 67


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

Show Answer
Correct Answer: CD

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

1 comment
Sign in to comment
DKAT2023Options: CD
Jul 12, 2024

C and D are correct