[Python] simple math
Just use formula from school to get permutation number of each part.\nhttps://en.wikipedia.org/wiki/Permutation#k-permutations_of_n\n\npython\nclass Solution:\n
Just use formula from school to get permutation number of each part.\nhttps://en.wikipedia.org/wiki/Permutation#k-permutations_of_n\n\n```python\nclass Solution:\n    def countAnagrams(self, s: str) -> int:\n\n        def get(word):\n            n = math.factorial(len(word))\n\n            for v in Counter(word).values():\n                n //= math.factorial(v)\n\n            return int(n) % (10**9 + 7)\n\n        total = 1  \n        for word in s.split():\n            total *= get(word)\n\n        return total % (10**9 + 7)\n```\n\n\n**Please vote up if you like my solution** \uD83D\uDE4F
['Math', 'Python', 'Python3']