Combining Map & Zip Functions

Python

 1|  a = [1,2,3,4]
 2|  b = [10,11,12,13]
 3|  
 4|  sum_a_b = list(map(lambda x: sum(x), zip(a,b)))
 5|  
 6|  >> [11, 13, 15, 17]
Zip | Map
Did you find this snippet useful?

Sign up for free to to add this to your code library