A = [1, 2, 3, 4]
B = [2, 4, 5, 6]
C = [3, 6, 7, 8]
D=[]
for elemA, elemB in zip(A, B):
D.append(elemA + elemB)
print(D)
D = [elemA + elemB for elemA, elemB in zip(A, B)]
print(D)
D = [elemA + elemB + elemC for elemA, elemB, elemC in zip(A, B, C)]
print(D)
D = [B[posicao] + elemA for posicao, elemA in enumerate(A)]
print(D)
QSA9IFsxLCAyLCAzLCA0XQpCID0gWzIsIDQsIDUsIDZdCkMgPSBbMywgNiwgNywgOF0KCkQ9W10KZm9yIGVsZW1BLCBlbGVtQiBpbiB6aXAoQSwgQik6CiAgICBELmFwcGVuZChlbGVtQSArIGVsZW1CKQogICAgCnByaW50KEQpCgpEID0gW2VsZW1BICsgZWxlbUIgZm9yIGVsZW1BLCBlbGVtQiBpbiB6aXAoQSwgQildCnByaW50KEQpCgpEID0gW2VsZW1BICsgZWxlbUIgKyBlbGVtQyBmb3IgZWxlbUEsIGVsZW1CLCBlbGVtQyBpbiB6aXAoQSwgQiwgQyldCnByaW50KEQpCgpEID0gW0JbcG9zaWNhb10gKyBlbGVtQSBmb3IgcG9zaWNhbywgZWxlbUEgaW4gZW51bWVyYXRlKEEpXQpwcmludChEKQ==
[3, 6, 8, 10]
[3, 6, 8, 10]
[6, 12, 15, 18]
[3, 6, 8, 10]