Your question is Generate All Subsets. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Write a function that generates all possible subsets of a set.
Implement def generate_subsets(items):, where items is a list of distinct integers. Return a list containing every subset, including the empty subset; preserve the input order within each subset. Any consistent ordering of the returned subsets is acceptable. For example, [1, 2] produces [[], [1], [1, 2], [2]], and [] produces [[]].
def generate_subsets(items):