what is the difference between regular comments and docstring in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

what is the difference between regular comments and docstring in python?

18th Sep 2022, 3:06 PM
follow ->
follow -> - avatar
1 Answer
0
regular comment : used for single line Comments are great for leaving notes for people working on your program. docstring : used for multiline comment Docstrings provide documentation about functions, classes, and modules. Use docstrings to teach other developers how to use your program.
18th Sep 2022, 3:27 PM
Mahmmoud Khalid
Mahmmoud Khalid - avatar