QuestionQ42Verified/Miscellaneous (List Comprehensions, Lambdas, Closures, I/O)Copy linkReport a problemAsk AstroTutorSave questionWhich of these lambda definitions are valid?Choose twoAlambda(x,y) = x//y - x%yBlambda x,y: return x//y - x%yClambda x,y: (x,y)Dlambda x,y: x//y - x%yShow AnswerAnswerExplanationPython lambda expressions require lambda, followed by parameters, a colon, and one expression. They cannot use = to define the function or include a return statement. A tuple expression and an arithmetic expression are both valid lambda bodies.Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion