is it necessary to put the closing quotation (""") marks in docstring in the next line of the code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

is it necessary to put the closing quotation (""") marks in docstring in the next line of the code?

means ...is this format correct? def square_root (): """ function to find square root of a number""" instead of : def square_root (): """ function to find square root of a number """

3rd Oct 2016, 8:43 AM
Arya sinha
Arya sinha - avatar
2 Answers
+ 1
Use the second one, it's more readable that way.
3rd Oct 2016, 9:16 AM
Zen
Zen - avatar
+ 1
both are right but tgr second one adds an extra line
6th Oct 2016, 2:33 PM
Krimesh
Krimesh - avatar