✅ [Python] set + BONUS ONE-LINER
\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.\n*\nThis solution employs the comparison of unique characters using set. \n\n\nPython #1.\n\nclass Solution:\n 
**\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n****\nThis solution employs the comparison of unique characters using `set`. \n****\n\n**Python #1.**\n```\nclass Solution:\n    def similarPairs(self, words: List[str]) -> int:\n        cnt = 0\n        for i,w1 in enumerate(words):\n            for w2 in words[i+1:]:\n                cnt += set(w1) == set(w2)\n        return cnt\n```\n\n**Python #2.** One-liner for the above solution.\n```\nclass Solution:\n    def similarPairs(self, w: List[str]) -> int:\n        \n        return sum(set(x) == set(y) for i,x in enumerate(w) for y in w[i+1:])\n\n```
[]