diff --git a/client/src/pages/guide/english/python/defining-functions/index.md b/client/src/pages/guide/english/python/defining-functions/index.md index 533d6d8619..189a1a6102 100644 --- a/client/src/pages/guide/english/python/defining-functions/index.md +++ b/client/src/pages/guide/english/python/defining-functions/index.md @@ -17,6 +17,8 @@ We can create a function that writes the Fibonacci series to an arbitrary bounda ... fib(2000) 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 -The [`def`](https://docs.python.org/3/reference/compound_stmts.html#def) keyword introduces a function definition. It must be followed by the function name and the parenthesized list of formal parameters. The statements that form the body of the function start at the next line and must be indented. +The [`def`](https://docs.python.org/3/reference/compound_stmts.html#def) keyword introduces a function definition. It must be followed by the function name and the parenthesized list of formal parameters, followed by a colon. The statements that form the body of the function start at the next line and must be indented. The first statement of the function body can optionally be a string literal; this string literal is the function's documentation string, or [docstring](https://www.python.org/dev/peps/pep-0257/) (More about docstrings can be found in the section Documentation Strings). Some tools use docstrings to automatically produce online or printed documentation or to let the user interactively browse through code. It's good practice to include docstrings in code that you write, so try to make a habit of it. + +No closing statement is required for the function (eg something similar to Ruby's END), all code that is indented following the opening definition is within scope of the function.