I am trying to understand how can lambda function be used.
def adder_func(a, b):return a + bprint(adder_func(4, 5))# trying with lambda
print(list(lambda a, b: a + b))
When trying to use lambda as a adder_function, why is that the result cannot be printed?
O/P:
9
Traceback (most recent call last):File "C:\Users\redsuren\PycharmProjects\py_charm_tutorial_amigoscode\lambda_adder.py", line 7, in <module>print(list(lambda a, b: a + b))
TypeError: 'function' object is not iterableProcess finished with exit code 1
AND, If keyword "list" is removed and try to print the return value, it give me some hexa_value, what does this value represent?
print(lambda a, b: a + b)
O/P:
<function <lambda> at 0x0000019440B5E0D0>