So my code is
for i in range(len(temp1)-1):
sim = similar(temp1[i][0],temp1[i+1][0])
#and a few more stuff here
It is important that in every loop I compare two adjacent items from the list.
How can I write this part with direct access to list's items while avoiding nested loops?
I want something like
for item in temp1:
sim = similar(item[0], next_item[0])
Thanks