[Python] Easy Bruteforce Method
This solution just chooses one string (the first one) and then counts how many "bad" characters exist. A "bad" character is a character that doesn\'t match it\'
This solution just chooses one string (the first one) and then counts how many "bad" characters exist. A "bad" character is a character that doesn\'t match it\'s corresponding character in the second string. If there are more than 2 bad indices, one swap is not enough to make them equal. (In fact, if there are any odd number of bad indices, no swaps can make the two strings equal). We only care about the case where we have 2 bad indices. We can then make an array of the characters in the string to then swap the two bad ones, and finally re-create the string to then compare it to our goal string.\n```\nclass Solution:\n    def areAlmostEqual(self, s1: str, s2: str) -> bool:\n        bad = [] # list of bad indices\n        if s1 == s2 : return True\n        \n        for i in range(len(s1)):\n            if s1[i] != s2[i]:\n                bad.append(i)\n                \n        if  not (len(bad) == 2): return False \n        \n        s1 = list(s1)\n        s1[bad[0]], s1[bad[1]] = s1[bad[1]], s1[bad[0]]\n        res = ""\n        \n        for char in s1:\n            res += char\n        \n        return (res == s2)\n```
['Array', 'String', 'Python']