Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/tutorial/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ called :file:`fibo.py` in the current directory with the following contents::

# Fibonacci numbers module

def fib(n): # write Fibonacci series up to n
def fib(n):
"""write Fibonacci series up to n"""
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()

def fib2(n): # return Fibonacci series up to n
def fib2(n):
"""return Fibonacci series up to n"""
result = []
a, b = 0, 1
while a < n:
Expand Down
Loading