from math import factorial
def nbanagrammes(mot):
n = len(mot)
L = []
P = 1
for lettre in mot:
c = ( lettre , mot.count(lettre) )
if c not in L:
L.append(c)
P *= factorial(c[1])
return int(factorial(n) / P)