All subsets

Write subsets(items) that returns every subset of the list of distinct values, as a list of lists. The empty subset counts. Order does not matter.

subsets([1, 2])     ->  [[], [1], [2], [1, 2]]    (in any order)
subsets([])         ->  [[]]

The point is to practise the include-or-exclude recursion with a shared partial list that is copied when recorded.

def subsets(items):
    ...