Doc: Fix is_prime (GH-9909)

This commit is contained in:
Julien Palard 2018-10-17 08:45:51 +02:00 committed by GitHub
parent c984d20ec8
commit 8e73ad38ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -257,6 +257,10 @@ ProcessPoolExecutor Example
1099726899285419]
def is_prime(n):
if n < 2:
return False
if n == 2:
return True
if n % 2 == 0:
return False