0
I still don't get why we use triple quotations. Also what's doc string?
2 ответов
+ 1
Using three quotation marks for a docstring is a PEP convention.
Docstrings are comments which are available during the program runtime, meaning that a developer can access the docstring using the __doc__ special attribute of an object.
Docstrings are usually used as an interactive help system, or as metadata.
+ 1
with using triple quotes u can retain the formats of contents to be printed in output as u are typing in program, means if u want to write content in multiple lines with some tabs. it is very easy without using \n and \t commands.