The following very_important_fuction() function is given. How do you display the docstring for a given function? (Select four options)

Questions & AnswersCategory: PythonThe following very_important_fuction() function is given. How do you display the docstring for a given function? (Select four options)
Geek Boy Staff asked 2 years ago

The following very_important_fuction() function is given. How do you display the docstring for a given function? (Select four options)

def very_important_fuction():
    """This is very important function that always returns 1."""
    return 1

a. (in IPython): ?very_important_function
b. very_important_function –help
c. (in IPython): very_important_function?
d. very_important_function.__code__
e. very_important_function.__doc__
f. help(very_important_function)

1 Answers
Lokesh Kumar Staff answered 2 years ago

a. (in IPython): ?very_important_function
c. (in IPython): very_important_function?
e. very_important_function.__doc__
f. help(very_important_function)