How to multiply elements of two lists using map and lambda in Python

1 Answer

0 votes
l1 = [1, 2, 3, 4]
l2 = [5, 6, 7, 8, 9]

lst = list(map(lambda x, y: x * y, l1, l2))

print(lst)

'''
run:
   
[5, 12, 21, 32]
 
'''

 



answered Jun 26, 2018 by avibootz

Related questions

1 answer 226 views
1 answer 240 views
1 answer 202 views
1 answer 219 views
3 answers 228 views
228 views asked Apr 18, 2021 by avibootz
...