Python3 Solution
\n\nclass Solution:\n    def maximumNumberOfStringPairs(self, words: List[str]) -> int:\n        ans = 0\n        for i in range(len(words)):\n            for j
\n```\nclass Solution:\n    def maximumNumberOfStringPairs(self, words: List[str]) -> int:\n        ans = 0\n        for i in range(len(words)):\n            for j in range(i+1, len(words)):\n                if words[i][0] == words[j][1] and words[i][1] == words[j][0]:\n                    ans += 1\n        return ans\n```
['Python', 'Python3']