SNIPPET
1 Upvote

Combining Map & Zip Functions

Python
General Python

a = [1,2,3,4]
b = [10,11,12,13]

sum_a_b = list(map(lambda x: sum(x), zip(a,b)))

>> [11, 13, 15, 17]

By detro - Last Updated Oct. 25, 2021, 10:43 p.m.

COMMENTS
RELATED SNIPPETS
Python For Else Loop
Python
General Python

Loop

2
1
Search Snippets by Tag: