Write a program that adds corresponding elements in two lists and prints a new list


Topic: Write a program that adds corresponding elements in two lists and prints a new list

Solution

list1 = [1, 2, 3, 4, 5]
list2 = [5, 4, 3, 2, 1]
sum_list = [a+b for (a,b) in zip(list1, list2)]
print(sum_list)



List all Python Programs