Wrong calculation in itertools documentation
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
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@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@python.org http://mail.python.org/mailman/listinfo/docs
-- Thanks, Andrew Svetlov
You are correct. I'm not sure where I failed, but I did :) Thanks Sander On 31 okt. 2012, at 10:37, Andrew Svetlov <andrew.svetlov@gmail.com> wrote:
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@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@python.org http://mail.python.org/mailman/listinfo/docs
-- Thanks, Andrew Svetlov
participants (2)
-
Andrew Svetlov -
Sander De Graaf