def list_difference(left, right):
blocked = set(right)<EOL>difference = []<EOL>for item in left:<EOL><INDENT>if item not in blocked:<EOL><INDENT>blocked.add(item)<EOL>difference.append(item)<EOL><DEDENT><DEDENT>return difference<EOL>
Take the not-in-place difference of two lists (left - right), similar to sets but preserving order.