def _remove_dups(L):
 seen_before = set([])
 L2 = []
 for i in L:
  if (i not in seen_before):
   seen_before.add(i)
   L2.append(i)
 return L2

def _remove_dups ( L ) : seen_before = set ( [ ] ) L2 = [ ] for i in L : if ( i not in seen_before ) : seen_before . add ( i ) L2 . append ( i ) return L2
removes duplicates and preserves the original order of the elements .