def list_difference(left, right):
 blocked = set(right)
 difference = []
 for item in left:
  if (item not in blocked):
   blocked.add(item)
   difference.append(item)
 return difference

def list_difference ( left , right ) : blocked = set ( right ) difference = [ ] for item in left : if ( item not in blocked ) : blocked . add ( item ) difference . append ( item ) return difference
take the not-in-place difference of two lists .