[Python 3] Simple one-liner using permutations() | Straightforward
\nclass Solution:\n    def numOfPairs(self, nums, target):\n        return sum(i + j == target for i, j in permutations(nums, 2))\n
```\nclass Solution:\n    def numOfPairs(self, nums, target):\n        return sum(i + j == target for i, j in permutations(nums, 2))\n```
['Python', 'Python3']