def loi_discrete_choices(X,P,n): L=choices(X,P,k=n) l=len(X) S=[0]*l for i in range(l): S[i]=L.count(X[i]) return S