I have created two lists.
list1 = [1, 2, 3, 4, 5, 6]
list2 = [1, 2, 3, 4, 5, 6]
After creating two lists, I want an addition of the elements of list1 and list2. Each element of list1 should add to each element of list2.
I can only come-up with merging of two lists with:
list1[:] + lis2[:]
I look-up for the pythons tutorial but couldn't find anything.
How could I add elements wise to elements addition of items of two lists in python?
EDIT 1: Ok that's great, I have already come across the question to which it is marked as duplicate, but my question is different.
I want each element of list1 should add to each element of list2. For example:
list1[1] + list2[1] adds and gives 2 and
list1[1] + list2[2] adds and gives 3 so on...
New list should have 36 elements