for only beginners🔥🔥🔥python
\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        def permute(st):\n            dic = Counter(st)\n            perm = 0\n            perm 
```\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        def permute(st):\n            dic = Counter(st)\n            perm = 0\n            perm = factorial(len(st))\n            for k,v in dic.items():\n                if v > 1:\n                    perm = perm//factorial(v)\n            return perm\n        \n        \n        li = list(s.split())\n        ans = 1\n        for word in li :\n            ans *= permute(word)\n        return ans%(10**9+7)\n        \n```
['Math']