mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-125383: Update fib function comment for accuracy (#125386)
`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
This commit is contained in:
parent
ce740d4624
commit
283ea5f3b2
1 changed files with 2 additions and 2 deletions
|
|
@ -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=' ')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue