I know lambda doesn't have a return expression. Normally
def one_return(a):
#logic is here
c = a + 1
return c
can be written:
lambda a : a + 1
How about write this one in a lambda function:
def two_returns(a, b):
# logic is here
c = a + 1
d = b * 1
return c, d
,
to tuple all over the place. It obfuscates what's actually going on. – Homopolar,
is not "promoted to tuple", that's literally the syntax for tuple creation. And it's perfectly clear IMHO. – Bis