Python easy to understand simple code

  • 0
    class Solution(object):
        def subsets(self, nums):
            :type nums: List[int]
            :rtype: List[List[int]]
            subset = [[]]
            for i in nums:
            	temp = []
            	for j in subset:
            	subset = subset + temp
            return subset

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.