MCQs>IT & Programming>Python>A function can be declared using 'def double(x): return x+x' or using 'double = lambda x: x+x'. What is the difference between these declarations?
Python MCQs
A function can be declared using "def double(x): return x+x" or using "double = lambda x: x+x". What is the difference between these declarations?
Answer
Correct Answer: The first (def) has its "__name__" attribute initialized to "double", but the second (lambda) does not.
Explanation:
Note: This Question is unanswered, help us to find answer for this one