3 lines
105 B
Python
3 lines
105 B
Python
def difference_by(a, b, fn):
|
|
b = set(map(fn, b))
|
|
return [item for item in a if fn(item) not in b] |