Advertisement
xathrya

Sum 2 List

Oct 22nd, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. import itertools
  2. L1 = [1,2,3,4,5,6,7,8,9]
  3. L2 = [1,2]
  4.  
  5. L3 = map(sum, itertools.izip_longest(L1,L2, fillvalue=0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement