index=[[25, 0], [25, 1], [25, 0], [25, 4], [25, 1], [25, 4], [56, 2], [56, 3]] for x in range(0,len(index)): for y in range(x+1,len(index)): if index[x][