Optional but very important On the next lines write the docstring for the function

Follow these steps:

a. On a new line, indent four spaces and type three quotation marks (a triple quote).

b. Type an explanation of what the function does and how to use it. See the sidebar "What's up, Doc?" to find out what to include.

c. On the next line, indent four spaces and type a triple quote. Your function and its docstring might look something like this:

def my function(arg1, arg2): ii ii ii

Perform my function on arg1 using arg2. Return a list.

ii II II

Was this article helpful?

0 0

Post a comment