def difference(a, b):
"""
Equivalent to A-B or A\B in set theory. Difference/Relative Complement
:param a: First list of dicts
:param b: Second list of dicts
:return: List of elements in a but not in b
"""
return list(filterfalse(lambda x: x in b, a))
评论列表
文章目录