I tried looping in a lambda function, and my code is:
zxm=lambda k:[k+x for x in range(k)]
print(zxm(5))
and the output which I got is when I gave the input:
[5,6,7,8,9]
My expected output is however the sum of all the 5 numbers and I want:
35
How can we loop in lambda? Also, is there a chance of recursion in one?