def _remove_dups(L):
seen_before = set([])<EOL>L2 = []<EOL>for i in L:<EOL><INDENT>if i not in seen_before:<EOL><INDENT>seen_before.add(i)<EOL>L2.append(i)<EOL><DEDENT><DEDENT>return L2<EOL>
Removes duplicates AND preserves the original order of the elements.
The set class is not guaranteed to do this.