Python 3, True Brute Force, Explained
~~~\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        res = 0\n        length_s, length_t = len(s), len(t)\n        for i in rang
~~~\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        res = 0\n        length_s, length_t = len(s), len(t)\n        for i in range(1, length_s+1): # finding out all possbile substrings in "s" sorted by the "s" length.\n            for j in range(length_s-i+1): # listing all possbile substrings in "s" with length been i.\n                for k in range(length_t-i+1): # listing all possbile substrings in "t" with length been i.\n                    # print("s:", s[j:j+i], "t:", t[k:k+i])\n                    cnt = 0\n                    for x, y in zip(s[j:j+i], t[k:k+i]):\n                        if x != y:\n                            cnt += 1\n                        if cnt > 1:\n                            break\n                    if cnt <= 1 and cnt != 0:\n                        res += 1\n        return res\n~~~\n\n#Runtime: 1240 ms, faster than 15.64% of Python3 online submissions for Count Substrings That Differ by One Character.\n#Memory Usage: 14 MB, less than 96.92% of Python3 online submissions for Count Substrings That Differ by One Character.\n
['Python', 'Python3']