78. Subsets - LeetCode
class Solution:
def subsets(self, nums: list[int]):
result = [[]]
for num in nums:
result += [r + [num] for r in result]
return result
class Solution:
def subsets(self, nums: list[int]):
result = [[]]
for num in nums:
result += [r + [num] for r in result]
return result