what is the difference between regular comments and docstring in python? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 4

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

18th Sep 2022, 3:06 PM
Rajeev Sharma
Rajeev Sharma - avatar
1 Réponse
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