Problem :

https://leetcode.com/problems/subsets/


My Solution :

class Solution:
def subsets(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
ret = []

def find(subset, remain):
if remain:
find(subset + remain[:1], remain[1:])
find(subset, remain[1:])
else:
ret.append(subset)

find([], nums)
return ret