Kaydet (Commit) 73866626 authored tarafından Sandro Tosi's avatar Sandro Tosi

use list() to wrap range() in itertools.permutations() example; thanks to Romain…

use list() to wrap range() in itertools.permutations() example; thanks to Romain MORLEVAT from docs@
üst 3e6c814b
......@@ -419,7 +419,7 @@ loops that truncate the stream.
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)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment