Commits

sandrotosi committed 6924b95

use list() to wrap range() in itertools.permutations() example; thanks to Romain MORLEVAT from docs@

Comments (0)

Files changed (1)

Doc/library/itertools.rst

             if r > n:
                 return
             indices = list(range(n))
-            cycles = range(n, n-r, -1)
+            cycles = list(range(n, n-r, -1))
             yield tuple(pool[i] for i in indices[:r])
             while n:
                 for i in reversed(range(r)):