Python soln
\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        ans=0\n        arr=[]\n        for i in range(len(s)):#Get All Substrings\n   
```\nclass Solution:\n    def countSubstrings(self, s: str, t: str) -> int:\n        ans=0\n        arr=[]\n        for i in range(len(s)):#Get All Substrings\n            for j in range(i+1,len(s)+1):\n                arr.append(s[i:j])\n        \n        for w in arr:\n            i=0\n            j=len(w)\n            while j<=len(t):\n                wrd=t[i:j]\n                k=1#Only one difference allowed\n                flag=True\n                for m in range(len(wrd)):\n                    if w[m]!=wrd[m]:\n                        if k==1:\n                            k=0\n                        else:\n                            flag=False\n                            break\n                if flag and k==0:\n                    ans+=1\n                i+=1\n                j+=1\n        return ans\n```
['Python3']