/ Published in: Python
Expand |
Embed | Plain Text
summed = [sum(pair) for pair in zip(listA, listB)] or from operator import add summed = map(add,listA,listB) or summed = map(sum,zip(listA,listB))
You need to login to post a comment.
summed = [sum(pair) for pair in zip(listA, listB)] or from operator import add summed = map(add,listA,listB) or summed = map(sum,zip(listA,listB))
You need to login to post a comment.