How to convert map output to list in Python

1 Answer

0 votes
result = map(lambda n: n * 2, [1, 2, 3, 4, 5])

lst = list(result)

print(lst)

'''
run:
   
[2, 4, 6, 8, 10]
 
'''

 



answered Jun 26, 2018 by avibootz
...