python - Element-wise addition of 2 lists? - Stack Overflow

PHOTO EMBED

Wed Jul 29 2020 19:19:59 GMT+0000 (Coordinated Universal Time)

Saved by @ameya2310 #python

>>> from operator import add
>>> list( map(add, list1, list2) )
[5, 7, 9]
content_copyCOPY

https://stackoverflow.com/questions/18713321/element-wise-addition-of-2-lists