<garvit244>15_1.py
def threeSum( nums):
    nums.sort()
    
    if (len(nums) >= 3) and (nums[0] == nums[len(nums) -1]) and (nums[0] == 0):
        return [[0, 0, 0]]
    
    result = []
    for index in range(len(nums) - 1):
        left = index+1
        right = len(nums) - 1
    
        while left < right:
            currSum = nums[index] + nums[left] + nums[right]
            if currSum == 0:
                result.append([nums[index], nums[left], nums[right]])
                left += 1
                right -= 1
            elif currSum < 0:
                left += 1
            else:
                right -= 1
    return  [list(t) for t in set(tuple(element) for element in result)]
def sample_funcname ( var_0 ) :
    var_0.sort ( )
    if ( len ( var_0 ) >= 3 ) and ( var_0 [ 0 ] == var_0 [ len ( var_0 ) - 1 ] ) and ( var_0 [ 0 ] == 0 ) :
        return [ [ 0 , 0 , 0 ] ]
    var_6 = [ ]
    for var_8 in range ( len ( var_0 ) - 1 ) :
        var_9 = var_8 + 1
        var_10 = len ( var_0 ) - 1
        while var_9 < var_10 :
            var_11 = var_0 [ var_8 ] + var_0 [ var_9 ] + var_0 [ var_10 ]
            if var_11 == 0 :
                var_6.append ( [ var_0 [ var_8 ] , var_0 [ var_9 ] , var_0 [ var_10 ] ] )
                var_9 += 1
                var_10 -= 1
            elif var_11 < 0 :
                var_9 += 1
            else :
                var_10 -= 1
    return [ list ( var_14 ) for var_14 in set ( tuple ( var_17 ) for var_17 in var_6 ) ]
