I saw some other O(n) solution is correct, but this one is also O(n), why exceed time limit?

```
class Solution(object):
def findDuplicates(self, nums):
if not nums:
return []
res = list(set([i for i in nums if nums.count(i) > 1]))
return res
```