hard?
\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        o,b=1,10**9+7\n        for v in s.split(\' \'):\n            r,n=1,sum(v:=Counter(v).val
```\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n        o,b=1,10**9+7\n        for v in s.split(\' \'):\n            r,n=1,sum(v:=Counter(v).values())\n            for k in v:r=r*comb(n,k)%b;n-=k\n            o=o*r%b\n        return o\n```
['Python3']