```
class Solution(object):
def subsets(self, nums):
result,each = [],[]
count = len(nums)
self.helper(nums, result, each, count)
return result
def helper(self, nums, result, each, count):
if count == 0:return result.append(each)
self.helper(nums[1:], result, each + [nums[0]], count - 1)
self.helper(nums[1:], result, each, count - 1)
```