```
class Solution(object):
def subsets(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
res = [[]]
self.helper(nums, res, 0)
return res
def helper(self, nums, res, pos):
if pos ==len(nums): return
res += [i+[nums[pos]] for i in res]
self.helper(nums, res, pos+1)
```