macpie.lltools.difference#

macpie.lltools.difference(a, b)#

Return list of items in a that are not in b, like a - b, while preserving order.

>>> l1 = [1, 2, 6, 8]
>>> l2 = [2, 3, 5, 8]
>>> l3 = diff(l1, l2)
>>> l3
[1, 6]
Parameters:
  • a – list

  • b – list