Python easy to read and understand | sliding window
```\nclass Solution:\n    def numberOfSubstrings(self, s: str) -> int:\n        a, b, c = 0, 0, 0\n        start, ans, n = 0, 0, len(s)\n        i = 0\n        
```\nclass Solution:\n    def numberOfSubstrings(self, s: str) -> int:\n        a, b, c = 0, 0, 0\n        start, ans, n = 0, 0, len(s)\n        i = 0\n        \n        while i < n:\n            if s[i] == \'a\':\n                a += 1\n            elif s[i] == \'b\':\n                b += 1\n            else:\n                c += 1\n            while a > 0 and b > 0 and c > 0:\n                ans += (n-i)\n                if s[start] == \'a\':\n                    a -= 1\n                elif s[start] == \'b\':\n                    b -= 1\n                else:\n                    c -= 1\n                start += 1\n            i += 1\n        \n        return ans
['Sliding Window', 'Python', 'Python3']