I've got this simplified list of lists:
nlist = [['E:\\photos\\IMG 1860 - Copy.jpg', 'E:\\photos\\IMG 1860.jpg', 'E:\\photos\\IMG 1873(2).jpg', 'E:\\photos\\IMG 1873(2).jpg']]
What I want to achieve is to remove duplicates from it, my code does not work and I know why but I cannot figure out workaround:
for b in range(len(nlist[0])-1):
if nlist[0][b] == nlist[0][b+1]:
print(nlist[0][b]) #it prints this line but get "IndexError: list index out of range" after
del nlist[0][b]
Any suggestions will be appreciated.