L1=[1,2,3,4]
L2=[5,6,7,8]
LRES=[0,0,0,0]
for i in range(len(L1)):
LRES[i]=L1[i] + L2[i]
print("L1")
print(L1)
print("L2")
print(L2)
print("LRES")
print(LRES)
L2=[5,6,7,8]
LRES=[0,0,0,0]
for i in range(len(L1)):
LRES[i]=L1[i] + L2[i]
print("L1")
print(L1)
print("L2")
print(L2)
print("LRES")
print(LRES)
Aucun commentaire:
Enregistrer un commentaire