I'm newbie to coding and this makes me crazy. I'm trying to compare items of a list to eliminate the duplicates but it doesn't work. here results are fine:
L = [1, 2, 3]
for i in L[:]:
for j in L[:]:
print(L.index(i), i, L.index(j), j)
but if I change the list to this:
L = [1, 1, 3]
it won't work. it skips some items and prints some others twice. any ideas?