In Python, is there a good way to add/sum (or otherwise combine) two lists of uneven length?
e.g. given some lists:
a = [1,2,3]
b = [1,2,3,4]
produce list c
:
c = [2,4,6,4]
where each element is the sum of a
and b
, taking a missing element as zero?