might be a dumb question but why when I try to use map() function on an already existing list:
nums = [1,2,3,4,5]
result = map(lambda num: num+num , nums)
print(result)
it returns me: <map object at 0x7f41cef17130>
, instead of my result;
on the contrary when I do this:
nums = 1,2,3,4,5
result = list(map(lambda num: num+num , nums))
print(result)
it does print me my desired result: [2, 4, 6, 8, 10]