Write a python function to add elements of two lists


Topic: Write a python function to add elements of two lists

Solution

def add_two_lists(list1, list2):
   list1 = [1, 2, 3]
   list2 = [4, 5, 6]
   sum_list = []
   for (item1, item2) in zip(list1, list2):
      sum_list.append(item1+item2)
   return sum_list



List all Python Programs