Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bb576c commit 6db39b1Copy full SHA for 6db39b1
1 file changed
Doc/library/itertools.rst
@@ -1048,9 +1048,7 @@ The following recipes have a more mathematical flavor:
1048
# factor(1_000_000_000_000_007) --> 47 59 360620266859
1049
# factor(1_000_000_000_000_403) --> 1000000000000403
1050
for prime in sieve(math.isqrt(n) + 1):
1051
- while True:
1052
- if n % prime:
1053
- break
+ while not n % prime:
1054
yield prime
1055
n //= prime
1056
if n == 1:
0 commit comments