Easy to understand python Solution
\nclass Solution:\n    def fourSum(self, nums, target):\n        """\n        :type nums: List[int]\n        :type target: int\n        :rtype: List[List[int]]\
```\nclass Solution:\n    def fourSum(self, nums, target):\n        """\n        :type nums: List[int]\n        :type target: int\n        :rtype: List[List[int]]\n        """\n        d = dict()\n        for i in range(len(nums)):\n            for j in range(i+1,len(nums)):\n                sum2 = nums[i]+nums[j]\n                if sum2 in d:\n                    d[sum2].append((i,j))\n                else:\n                    d[sum2] = [(i,j)]\n        \n        result = set()\n        for key in d:\n            value = target - key\n            if value in d:\n                list1 = d[key]\n                list2 = d[value]\n                for (i,j) in list1:\n                    for (k,l) in list2:\n                        if i!=k and i!=l and j!=k and j!=l:\n                            flist = [nums[i],nums[j],nums[k],nums[l]]\n                            flist.sort()\n                            result.add(tuple(flist))\n        return list(result)\n```
[]