Hi all,

I come out a python solution for this problem, but it indicates "Time Limited Exceeded", can anyone help me to modify my code?

```
class Solution:
# @param {integer[]} nums
# @return {integer[][]}
def threeSum(self, nums):
self.nums = nums
nums = sorted(nums)
f = []
n = len(nums)
for i in xrange(n-1):
j = i+1
while nums[i]+nums[j] <= 0:
k = 0-(nums[i]+nums[j])
p = sorted(nums)
p.remove(p[j])
p.remove(p[i])
if k in p:
if sorted([nums[i],nums[j],k]) not in f:
f.append(sorted([nums[i],nums[j],k]))
if j < n-2:
j = j+1
else:
break
return f
```

thanks