How to get the result, not a link to memory (python)
ChapeauClaque (0)
squares = []
for x in range(5):
    squares.append(lambda x : x**2)
print (list(squares))

Result: [<function <lambda> at 0x7f87461dee18>, <function <lambda> at 0x7f87419b40d0>, <function <lambda> at 0x7f87419b4158>, <function <lambda> at 0x7f87419b41e0>, <function <lambda> at 0x7f87419b4268>]
Tell me, please, how to get a list of function results

You are viewing a single comment. View All
ChapeauClaque (0)

@leon332157 The problem is not that I can not use the function. Why the function works this way.