I've been working on the remove_duplicates exercise and took a peak at enavarro33's solution and can't figure out why this works. In particular, under what circumstances would if i != i ever be true? And why return i?
def remove_duplicates (x): p =  for i in x: if i != i: p.append(i) return i
i'm curious because I've been reading up on big-o and wanted to approach this looking for the shortest approximate runtime. Not sure if this is it, but I'm missing something here.
I'm new to all of this, but I'll try my best to follow your responses.