def echantillon(n,p): L=[bernoulli(p) for i in range(n)] return L