Python 3   ||   1 line,  combinations   ||   T/S: 97% / 98%
\nclass Solution:\n    def countPairs(self, nums: List[int], target: int) -> int:\n\n        return sum(map(lambda x: x[0]+x[1] < target,\n                     
```\nclass Solution:\n    def countPairs(self, nums: List[int], target: int) -> int:\n\n        return sum(map(lambda x: x[0]+x[1] < target,\n                                    combinations(nums, 2)))\n```\n[https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/submissions/1292803787/](https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target/submissions/1292803787/)\n\nI could be wrong, but I think that time complexity is *O*(*N*^2) and space complexity is *O*(*N*), in which *N* ~ `len(nums)`.
['Python3']