# File: Programs/ChapterLists/vectorOp.py """ L1= [-1, 3, -10, 2] L2= [1, 0, 0, 1] [0, -1, -1, 0, 4, 3, 3, 4, -9, -10, -10, -9, 3, 2, 2, 3] [0, 3, -10, 3] """ def vectorAdd(V1,V2): R = [] for i in range(len(V1)): R.append(V1[i]+ V2[i]) return R def main(): L1 = [-1, 3, -10, 2] L2 = [1,0,0,1] print("L1= ", L1, "\nL2=",L2) L3 = [(x + y) for x in L1 for y in L2] print(L3) print(vectorAdd(L1,L2)) main()