i have tuples in a list :
a = [((1, 6), (8, 2)), ((8, 2), (6, 3)), ((6, 3), (9, 4)), ((9, 4), (5, 7))]
i want to assign all value in list, example:
A = [1,6], B = [8,2]
A = [8,2], B = [6,3]
then perform calculations between the elements together and print the results on the screen
C1 = (A[1]+B[1],A[2]+B[2])
C2 = (A[1]+B[1],A[2]+B[2])
Thank you!!!
X = [1,8,6,9,5]
Y = [6,2,3,4,7]
res = list(zip(X,Y))
a = list(zip(res, res[1:]))
print(a)
I can't think how to assign A and B in list
for (A, B) in a:and then you do what you want with them...[(1, 6), (8, 2), (6, 3), (9, 4), (5, 7)].