You are on page 1of 1

Q) Write a Python Program that takes two lists of equal length containing integers, and returns a new list

where
each element is the sum of the corresponding elements in the input lists.

In [1]:

L1 = eval(input("Enter a list: "))


L2 = eval(input("Enter another list of same length: "))
L3 = []

for i in range(len(L1)):
L3.append(L1[i] + L2[i])
print("New List: ",L3)

Enter a list: [1,2,3,4]


Enter another list of same length: [9,8,7,6]
New List: [10, 10, 10, 10]

You might also like