I have 2 lists of data and I would like to create a tuple for this lists that looks like
ttuple=(1,[4,6,counter])
listA=[1,2,3,4,5,6,7,8,9]
listB=[3,4,5,7,8,9,0,-4,5]
counter=0
for i in range(len(listA)):
for lista in listA:
for listb in listB:
data=(i,[lista,listb,counter])
myList.append(data)
print(data)
Only the last value is printed. Can someone point to me what I am doing wrong. Its supposed to print tuple list of 9 values like the following. The last number is a counter that increments by 1
(0,[1,3,0),(1,[2,4,0]),(2,[3,5,0])
All i get is the following:
(0,[1,1]),(0,[1,1]),(0,[1,1]), (1,[2,2]),(1,[2,2]),(1,[2,2])