[3.12] gh-125383: Update fib function comment for accuracy (GH-125386) (#125396)

gh-125383: Update `fib` function comment for accuracy (GH-125386)

`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
(cherry picked from commit 283ea5f3b2)

Co-authored-by: Wulian <xiguawulian@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-10-13 13:17:55 +02:00 committed by GitHub
parent a144037ac3
commit 00c596d8ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -461,8 +461,8 @@ Defining Functions
We can create a function that writes the Fibonacci series to an arbitrary
boundary::
>>> def fib(n): # write Fibonacci series up to n
... """Print a Fibonacci series up to n."""
>>> def fib(n): # write Fibonacci series less than n
... """Print a Fibonacci series less than n."""
... a, b = 0, 1
... while a < n:
... print(a, end=' ')