Every subset
Given a list nums of distinct integers, return every subset of it, including the empty one and nums itself. Each subset must appear exactly once; the order of the subsets, and of the numbers inside each subset, does not matter.
0 ≤ len(nums) ≤ 10, so the answer has at most 2¹⁰ = 1,024 subsets.
Examples
all_subsets([1,2,3])→[[],[1],[2],[3],[1,2],[1,3],[2,3],[1,2,3]]all_subsets([0])→[[],[0]]all_subsets([])→[[]]