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

What is true about lambda functions? (Choose two.)

    Correct Answer: A, B

    Lambda functions are also known as anonymous functions, so it is true that they are called anonymous functions. Lambda functions can indeed return None, due to the fact that any Python function, including lambda functions, can return None explicitly or implicitly if no value is specified. Consequently, the statement that they cannot return None is incorrect. Lambda functions do not require the return keyword; they automatically return the value of the expression they contain. Finally, lambda functions can have zero or more parameters, thus there is no requirement for them to have a non-zero number of parameters.

Discussion
DKAT2023Options: AD

A and D are corrects

Dave304409Options: AD

is correct