How to sum first element of one list to last element of second list if both list contains same amount of elements in python.
Source code (should be kind of like this):
def update(l1,l2,l3):for i in range(len(l1)):l3.append(l1[i] + l2[-i]) #i know -i is not correct way to start indexing in reversel1=[1,2,3,4,5]
l2=[6,7,8,9,10]
l3=[]
update(l1,l2,l3)
print(l1)
print(l2)
print(l3)
It would mean a lot if someone could help me with this problem.