[docs] Wrong calculation in itertools documentation

Andrew Svetlov andrew.svetlov at gmail.com
Wed Oct 31 10:37:14 CET 2012


Sure, the doc is correct. The count if permutations is n! / (n-r)!
Try yourself, please.

On Sun, Oct 7, 2012 at 1:29 AM, Sander De Graaf <sander at rotzorg.org> wrote:
> Hi,
>
> I'm reading docs.python.org/library/itertools.html @ permutations().
>
> It writes:
>
>     The number of items returned is n! / (n-r)! ...
>
> The number should be n! / r!
>
> Thanks,
> Sander De Graaf
>
> _______________________________________________
> docs mailing list
> docs at python.org
> http://mail.python.org/mailman/listinfo/docs



-- 
Thanks,
Andrew Svetlov


More information about the docs mailing list