```
class Solution:
def subsets(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
res = [nums]
cur = [tuple(nums)]
l = 0
while l < len(nums):
new_cur = set()
for n in cur:
for i in range(len(n)):
new_cur.add(n[:i] + n[i+1:])
cur = new_cur
for n in cur:
res.append(n)
l += 1
return res
```