I'm trying to compare every first elements inside a python nested list so I decided to loop in the length of list-1
to compare the element with next, but I'm still getting "list index out of range".
Isn't it supposed to compare the first with second, the second with third, and third with fourth, for a total of 3 interactions?
A =[[1,2,3]
,[2,5,6]
,[5,2,3]
,[5,2,3]
]
S = len(A) - 1
for n in range(S):
if(A[0][n]) == (A[0][n+1]):
print("no")
else:
print('yes we did it')