Related questions

0 votes
1 answer 1 view
1 view asked 3 days ago in Python by anonymous
0 votes
1 answer 3 views
3 views asked May 30 in java by anonymous
0 votes
1 answer 1 view
1 view asked May 25 in learn seo free by anonymous
0 votes
1 answer 4 views
0 votes
0 answers 2 views
2 views asked 4 days ago in Python by anonymous
Welcome to Python- Question2Answer, where you can ask questions and receive answers from other members of the community.

What is a docstring?

0 votes

What is a docstring?

asked 6 days ago in Python by anonymous

1 Answer

0 votes

docstring is the documentation string for a function. It can be accessed by

function_name.__doc__

it is declared as:

1

2

def function_name():

"""your docstring"""

Writing documentation for your progams is a good habit and makes the code more understandable and reusable.

answered 6 days ago by anonymous
...