Python || Simple Math and Combinatorics
\n\n\nclass Solution:\n    def countVowels(self, word: str) -> int:\n        vows = set("aeiou")\n        l = len(word)\n        s = 0\n        for i in range(l
![image](https://assets.leetcode.com/users/images/8328cd28-2eae-4003-b1dc-b7a0313bc9bd_1645633209.8877914.png)\n\n```\nclass Solution:\n    def countVowels(self, word: str) -> int:\n        vows = set("aeiou")\n        l = len(word)\n        s = 0\n        for i in range(l):\n            if word[i] in vows:\n                s += (i + 1) * (l - i)\n        return s\n```\n**Please upvote if you find it interesting and helpful!!!\nThank you.**
['String', 'Combinatorics', 'Ordered Set', 'Python3']