Python3 simple solution
\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        count = 0\n        for i in range(len(s)):\n            for j in range(len(t))
```\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        count = 0\n        for i in range(len(s)):\n            for j in range(len(t)):\n                x,y = i,j\n                d = 0\n                while x < len(s) and y < len(t):\n                    if s[x] != t[y]:\n                        d += 1\n                    if d == 1:\n                        count += 1\n                    if d == 2:\n                        break\n                    x += 1\n                    y += 1\n        return count   \n```\n**If you like this solution, please upvote for this**
['Python3']